Ignore:
Timestamp:
Mar 31, 2015, 3:49:07 PM (10 years ago)
Author:
emillour
Message:

All models: Reorganizing the physics/dynamics interface.

  • makelmdz and makelmdz_fcm scripts adapted to handle the new directory settings
  • misc: (replaces what was the "bibio" directory)
  • Should only contain extremely generic (and non physics or dynamics-specific) routines
  • Therefore moved initdynav.F90, initfluxsto.F, inithist.F, writedynav.F90, write_field.F90, writehist.F to "dyn3d_common"
  • dynlonlat_phylonlat: (new interface directory)
  • This directory contains routines relevent to physics/dynamics grid interactions, e.g. routines gr_dyn_fi or gr_fi_dyn and calfis
  • Moreover the dynlonlat_phylonlat contains directories "phy*" corresponding to each physics package "phy*" to be used. These subdirectories should only contain specific interfaces (e.g. iniphysiq) or main programs (e.g. newstart)
  • phy*/dyn1d: this subdirectory contains the 1D model using physics from phy*

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/makelmdz_fcm

    r1391 r1403  
    4040LIBOGCM=$LMDGCM/libo
    4141LIBFGCM=$LMDGCM/libf
     42DYN_COMMON_PATH=$LIBFGCM/dyn3d_common
    4243# path for optional packages, but default set to ".void_dir"
     44FILTRE_PATH=$LMDGCM/.void_dir
     45DYN_PHYS_PATH=$LMDGCM/.void_dir
     46DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
    4347RRTM_PATH=$LMDGCM/.void_dir
    4448SISVAT_PATH=$LMDGCM/.void_dir
     
    8791[-chimie INCA/false]       : (Earth) with INCA chemistry model or without (default: false)
    8892[-cosp cosp/false]         : (Earth) add the cosp model (default: false)
     93[-sisvat true/false]  : (Earth) compile with/without sisvat package (default: false)
     94[-rrtm true/false]    : (Earth) compile with/without rrtm package (default: false)
    8995[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
    9096[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
     
    236242fi
    237243
     244phys_root=$physique
     245if [[ "${physique:0:3}" == "lmd" ]] ; then phys_root=lmd ; fi
     246if [[ "${physique:0:3}" == "mar" ]] ; then phys_root=mar ; fi
     247if [[ "${physique:0:4}" == "mars" ]] ; then phys_root=mars ; fi
     248if [[ "${physique:0:3}" == "std" ]] ; then phys_root=std ; fi
     249if [[ "${physique:0:5}" == "venus" ]] ; then phys_root=venus ; fi
     250if [[ "${physique:0:5}" == "titan" ]] ; then phys_root=titan ; fi
     251if [[ "${physique:0:3}" == "dev" ]] ; then phys_root=dev ; fi
     252
    238253if [[ "$physique" != "nophys" ]]
    239254then
    240255   #We'll use some physics
    241256   CPP_KEY="$CPP_KEY CPP_PHYS"
    242    if [[ "${physique:0:3}" == "lmd" ]]
     257   if [[ "${phys_root}" == "lmd" ]]
    243258   then
    244259   #For lmd physics, default planet type is Earth
    245260   CPP_KEY="$CPP_KEY CPP_EARTH"
    246261   fi
     262   # set the dyn/phys interface path
     263   DYN_PHYS_PATH="${LIBFGCM}/dynlonlat_phylonlat"
     264   DYN_PHYS_SUB_PATH="${LIBFGCM}/dynlonlat_phylonlat/phy${phys_root}"
     265fi
     266
     267if [[ "$filtre" == "filtrez" ]]
     268then
     269   FILTRE_PATH=${LIBFGCM}/$filtre
    247270fi
    248271
     
    360383fi
    361384
    362 if [[ "$physique" == "titan" ]]
     385# for Titan (but could be used by others as well), there is also "chimtitan"
     386if [[ -d ${LIBFGCM}/chim${physique} ]]
    363387then
    364388   CHEM_PATH="${LIBFGCM}/chim${physique}"
     
    463487if (( $dimension == 1 ))
    464488then
     489  CPP_KEY="$CPP_KEY CPP_1D"
    465490##in 1D, add dyn3d to include path (because main prog is in physics)
    466   INCLUDE="$INCLUDE -Ilibf/dyn3d"
    467 #  echo pas de dynamique
    468 #  dyn="DYN= L_DYN=-ldyn3d "
     491  INCLUDE="$INCLUDE -Ilibf/dyn3d -Ilibf/dyn3d_common"
     492## no filtre in 1d:
     493  FILTRE_PATH=$LMDGCM/.void_dir
     494## no need to compile all routines in dyn3d_common either:
     495  DYN_COMMON_PATH=$LMDGCM/.void_dir
     496## no need to compile all routines in dynlmdz_phy... ;
     497## (because key ones are included in 1D main program)
     498  DYN_PHYS_PATH=$LMDGCM/.void_dir
     499  DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
    469500fi
    470501
     
    523554else
    524555  SUFF_NAME=${SUFF_NAME}_seq
    525   DYN=dyn${dimc}d
    526   ## specific stuff for 1D model (needs includes which are in dyn3d)
    527   if (( $dimension == 1 )) ; then
    528     SUFF_NAME=${SUFF_NAME}
    529     DYN=dyn3d
     556  if (( $dimension == 1 ))
     557  then
     558    # dynamics-related routines in"dyn1d" subdirectory of phy${physique}
     559    DYN=phy${physique}/dyn1d
     560  else
     561    DYN=dyn${dimc}d
    530562  fi
    531563fi
     
    561593echo "%LIBO          $LIBOGCM"       >> $config_fcm
    562594echo "%DYN           $DYN"           >> $config_fcm
     595echo "%DYN_COMMON    $DYN_COMMON_PATH" >> $config_fcm
     596echo "%FILTRE        $FILTRE_PATH"   >> $config_fcm
    563597echo "%PHYS          phy${physique}" >> $config_fcm
     598echo "%DYN_PHYS      $DYN_PHYS_PATH" >> $config_fcm
     599echo "%DYN_PHYS_SUB  $DYN_PHYS_SUB_PATH" >> $config_fcm
    564600echo "%RRTM          $RRTM_PATH"     >> $config_fcm
    565601echo "%SISVAT        $SISVAT_PATH"   >> $config_fcm
     
    594630ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src
    595631
    596 #eventual cleanup for SISVAT
    597 #sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp
    598 #mv bld.tmp bld.cfg
    599 
    600 #eventual cleanup for RRTM
    601 #sed -e 's/^src::rrtm/#src::rrtm/' bld.cfg > bld.tmp
    602 #mv bld.tmp bld.cfg
    603 
    604632
    605633if [[ -r $LIBFGCM/grid/dimensions.h ]]
Note: See TracChangeset for help on using the changeset viewer.