Changeset 1499


Ignore:
Timestamp:
Nov 19, 2015, 4:04:48 PM (9 years ago)
Author:
emillour
Message:

Mars GCM:

  • Added option "-cpp" so that users can add the definition of specific precompiling flags in makegcm_* scripts (and added default BLAS and LAPACK flags for ifort on Gnome and Ada).
  • Put calls to dgesv (Lapack) routine in photochemistry_asis.F90 under the LAPACK preprocessing flag. Moved secondary routines in photochemistry.F and photochemistry_asis.F90 into the main (via contains instruction) to avoid multiple definitions of routines with identical names.

EM

Location:
trunk/LMDZ.MARS
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r1467 r1499  
    21952195  Default value is True. The goal is to disable supersaturation even
    21962196  with microphysics for comparison purposes.
     2197
     2198== 19/11/2015 == EM
     2199- Added option "-cpp" so that users can add the definition of specific
     2200  precompiling flags in makegcm_* scripts (and added default BLAS and
     2201  LAPACK flags for ifort on Gnome and Ada).
     2202- Put calls to dgesv (Lapack) routine in photochemistry_asis.F90 under the
     2203  LAPACK preprocessing flag. Moved secondary routines in photochemistry.F and
     2204  photochemistry_asis.F90 into the main (via contains instruction) to avoid
     2205  multiple definitions of routines with identical names.
  • trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F

    r1430 r1499  
    167167      call chimtogcm(nlayer, nq, zycol, lswitch, nesp, rm)
    168168
    169       return
    170       end
     169      contains
     170
    171171
    172172c*****************************************************************
     
    755755      end do
    756756
    757       return
    758       end
     757      end subroutine chimie
    759758
    760759c*****************************************************************
     
    857856      end do
    858857
    859       return
    860       end
     858      end subroutine gcmtochim
    861859
    862860c*****************************************************************
     
    943941      end if
    944942
    945       return
    946       end
     943      end subroutine chimtogcm
    947944
    948945c*****************************************************************
     
    15641561      end if
    15651562c
    1566       return
    1567       end
     1563      end subroutine chemrates
     1564
     1565      end subroutine photochemistry
  • trunk/LMDZ.MARS/libf/aeronomars/photochemistry_asis.F90

    r1496 r1499  
    221221   cnew(:) = c(ilev,:)
    222222
     223#ifdef LAPACK
    223224   call dgesv(nesp,1,mat,nesp,indx,cnew,nesp,code)
    224 
     225#else
     226   write(*,*) "photochemistry_asis error, missing LAPACK routine dgesv"
     227   stop
     228#endif
    225229!  eliminate small values
    226230
     
    287291      cnew(:) = c(ilev,:)
    288292
     293#ifdef LAPACK
    289294      call dgesv(nesp,1,mat,nesp,indx,cnew,nesp,code)
    290 
     295#else
     296   write(*,*) "photochemistry_asis error, missing LAPACK routine dgesv"
     297   stop
     298#endif
    291299   end if
    292300
     
    351359               i_n, i_n2d, i_no, i_no2, i_n2, dens, c)
    352360
    353 return
    354 end
     361contains
    355362
    356363!======================================================================
     
    958965      v_phot(:,nb_phot) = h005(:)
    959966
    960 return
    961 end
     967end subroutine reactionrates
    962968
    963969!======================================================================
     
    10751081end do
    10761082
    1077 return
    1078 end
     1083end subroutine fill_matrix
    10791084
    10801085!================================================================
     
    15801585end if 
    15811586
    1582 return
    1583 end
     1587end subroutine indice
    15841588
    15851589!*****************************************************************
     
    17481752      end do
    17491753
    1750       return
    1751       end
     1754      end subroutine gcmtochim
    17521755
    17531756!*****************************************************************
     
    18201823      end do
    18211824
    1822       return
    1823       end
     1825      end subroutine chimtogcm
     1826
     1827end subroutine photochemistry_asis
     1828
  • trunk/LMDZ.MARS/makegcm_g95

    r1403 r1499  
    99set phys="PHYS=$physique"
    1010set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat'
     11set cpp_def=''
    1112set ntrac = 1
    1213set filtre=filtrez
     
    312313           are located in directories that are not referenced by default.
    313314
     315-cpp FLAG  Add preprocessing definition of FLAG
     316
    314317-adjnt     Compiles the adjoint model to the dynamical code.
    315318
     
    357360     case -include
    358361        set include="$include -I$2" ; shift ; shift ; goto top
     362
     363     case -cpp
     364        set cpp_def="$cpp_def -D$2" ; shift ; shift ; goto top
    359365
    360366     case -adjnt
     
    737743else if $LINUX then
    738744# Ehouarn : adapt to g95
    739  set optim="$optim -fmod=${libo}"
    740  set optim90="$optim90 -fmod=${libo}"
    741  set optimtru90="$optimtru90 -fmod=${libo}"
     745 set optim="$optim -fmod=${libo} $cpp_def"
     746 set optim90="$optim90 -fmod=${libo} $cpp_def"
     747 set optimtru90="$optimtru90 -fmod=${libo} $cpp_def"
    742748# Ehouarn: remove set mod_loc_dir def below; mod_loc_dir=$localdir (set above)
    743749# set mod_loc_dir=$libo
  • trunk/LMDZ.MARS/makegcm_gfortran

    r1403 r1499  
    99set phys="PHYS=$physique"
    1010set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat'
     11set cpp_def=''
    1112set ntrac = 1
    1213set filtre=filtrez
     
    308309-O "compilation options" set of fortran compilation options to use
    309310
     311-cpp FLAG  Add preprocessing definition of FLAG
     312
    310313-include path
    311314           Used if the subroutines contain #include files (ccp) that
     
    357360     case -include
    358361        set include="$include -I$2" ; shift ; shift ; goto top
     362
     363     case -cpp
     364        set cpp_def="$cpp_def -D$2" ; shift ; shift ; goto top
    359365
    360366     case -adjnt
     
    737743else if $LINUX then
    738744# Ehouarn : adapt to gfortran
    739  set optim="$optim -I${libo}"
    740  set optim90="$optim90 -I${libo}"
    741  set optimtru90="$optimtru90 -ffree-form -I${libo}"
     745 set optim="$optim -I${libo} $cpp_def"
     746 set optim90="$optim90 -I${libo} $cpp_def"
     747 set optimtru90="$optimtru90 -ffree-form -I${libo} $cpp_def"
    742748# Ehouarn: remove set mod_loc_dir def below; mod_loc_dir=$localdir (set above)
    743749# set mod_loc_dir=$libo
  • trunk/LMDZ.MARS/makegcm_ifort

    r1416 r1499  
    99set phys="PHYS=$physique"
    1010set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat'
     11set cpp_def=''
    1112set ntrac = 1
    1213set filtre=filtrez
     
    5051hostname | grep 'ada' > /dev/null
    5152if ( $? == 0 ) then
    52    echo "*** NETCDF preset *** CICLAD cluster"
     53   echo "*** NETCDF preset *** Ada cluster"
    5354   setenv NCDFLIB /smplocal/pub/NetCDF/4.1.3/seq/lib
    5455   setenv NCDFINC /smplocal/pub/NetCDF/4.1.3/seq/include
     
    165166set optim90=""
    166167set oplink=""
     168
     169hostname | grep 'n201' > /dev/null
     170if ( $? == 0 ) then
     171   #on Gnome Lapack & Blas available via ifort's MKL
     172   set cpp_def="$cpp_def -DBLAS -DLAPACK"
     173endif
     174hostname | grep 'ada' > /dev/null
     175if ( $? == 0 ) then
     176   #on Ada Lapack & Blas available via ifort's MKL
     177   set cpp_def="$cpp_def -DBLAS -DLAPACK"
     178endif
    167179
    168180########################################################################
     
    331343           are located in directories that are not referenced by default.
    332344
     345-cpp FLAG  Add preprocessing definition of FLAG
     346
    333347-adjnt     Compiles the adjoint model to the dynamical code.
    334348
     
    376390     case -include
    377391        set include="$include -I$2" ; shift ; shift ; goto top
     392
     393     case -cpp
     394        set cpp_def="$cpp_def -D$2" ; shift ; shift ; goto top
    378395
    379396     case -adjnt
     
    755772else if $LINUX then
    756773# Ehouarn : adapt to gfortran
    757  set optim="$optim -I${libo}"
    758  set optim90="$optim90 -I${libo}"
    759  set optimtru90="$optimtru90 -I${libo}"
     774 set optim="$optim -I${libo} $cpp_def"
     775 set optim90="$optim90 -I${libo} $cpp_def"
     776 set optimtru90="$optimtru90 -I${libo} $cpp_def"
    760777# Ehouarn: remove set mod_loc_dir def below; mod_loc_dir=$localdir (set above)
    761778# set mod_loc_dir=$libo
  • trunk/LMDZ.MARS/makegcm_pgf

    r1403 r1499  
    99set phys="PHYS=$physique"
    1010set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat'
     11set cpp_def=''
    1112set ntrac = 1
    1213set filtre=filtrez
     
    317318           are located in directories that are not referenced by default.
    318319
     320-cpp FLAG  Add preprocessing definition of FLAG
     321
    319322-adjnt     Compiles the adjoint model to the dynamical code.
    320323
     
    362365     case -include
    363366        set include="$include -I$2" ; shift ; shift ; goto top
     367
     368     case -cpp
     369        set cpp_def="$cpp_def -D$2" ; shift ; shift ; goto top
    364370
    365371     case -adjnt
     
    738744 set optimtru90=" $optimtru90 -I$libo "
    739745else if $LINUX then
    740  set optim="$optim -module $libo"
    741  set optim90="$optim90 -module $libo"
    742  set optimtru90="$optimtru90 -module $libo"
     746 set optim="$optim -module $libo $cpp_def"
     747 set optim90="$optim90 -module $libo $cpp_def"
     748 set optimtru90="$optimtru90 -module $libo $cpp_def"
    743749# Ehouarn: remove set mod_loc_dir def below; mod_loc_dir=$localdir (set above)
    744750# set mod_loc_dir=$libo
Note: See TracChangeset for help on using the changeset viewer.