Ignore:
Timestamp:
Jun 17, 2022, 4:24:49 PM (3 years ago)
Author:
lguez
Message:

Sync latest trunk changes to branch LMDZ-ECRAD.

Location:
LMDZ6/branches/LMDZ-ECRAD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ-ECRAD

  • LMDZ6/branches/LMDZ-ECRAD/makelmdz_fcm

    r3880 r4171  
    2323couple=false
    2424veget=false
    25 sisvat=false
    2625inlandsis=false
    2726rrtm=false
    28 ecrad=false
     27rad="old"
    2928dust=false
    3029strataer=false
    3130chimie=false
    3231parallel=none
    33 paramem="par"
     32paramem="mem"
    3433compil_mod=prod
    3534io=ioipsl
     
    4140full=''
    4241libphy=false
     42isotopes=false
     43isoverif=false
     44diagiso=false
     45isotrac=false
     46force_compile=false
    4347
    4448arch_defined="FALSE"
     
    5559DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
    5660PHY_COMMON_PATH=$LMDGCM/.void_dir
    57 RRTM_PATH=$LMDGCM/.void_dir
     61RAD_PATH=$LMDGCM/.void_dir
     62INLANDSIS_PATH=$LMDGCM/.void_dir
    5863ECRAD_PATH=$LMDGCM/.void_dir
    5964DUST_PATH=$LMDGCM/.void_dir
    6065STRATAER_PATH=$LMDGCM/.void_dir
    61 SISVAT_PATH=$LMDGCM/.void_dir
    6266COSP_PATH=$LMDGCM/.void_dir
    6367fcm_path=$LMDGCM/tools/fcm/bin
     
    6771########################################################################
    6872
    69 CPP_KEY=""
     73CPP_KEY="IN_LMDZ"
    7074INCLUDE=""
    7175LIB=""
     
    101105[-cosp2 true/false]    : compile with/without cosp2 package (default: false)
    102106[-cospv2 true/false]    : compile with/without cospv2 package (default: false)
    103 [-sisvat true/false]  : compile with/without sisvat package (default: false)
    104107[-inlandsis true/false]  : compile with/without inlandsis package (default: false)
    105108[-rrtm true/false]    : compile with/without rrtm package (default: false)
    106 [-ecrad true/false]    : compile with/without ecrad package (default: false)
     109[-rad old/rrtm/ecrad]    : compile with old/rrtm/ecrad radiatif code (default: old)
    107110[-dust true/false]    : compile with/without the dust package by Boucher and co (default: false)
    108111[-strataer true/false]    : compile with/without the strat aer package by Boucher and co (default: false)
     112[-isotopes true/false]    : compile with/without water isotopes in the physics
     113[-isoverif true/false]    : compile with/without verifications for water isotopes in the physics
     114[-diagiso true/false]    : compile with/without special diagnostics for water isotopes in the physics
     115[-isotrac true/false]    : compile with/without tracers of water isotopes in the physics
    109116[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
    110117[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
     
    113120[-cpp CPP_KEY]             : additional preprocessing definitions
    114121[-adjnt]                   : adjoint model, not operational ...
    115 [-mem]                     : reduced memory dynamics (if in parallel mode)
     122[-mem]                     : reduced memory dynamics (obsolete flag; always on in parallel mode)
    116123[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
    117124[-link LINKS]              : additional links with other libraries
     
    122129[-ext_src path]            : path to an additional set of routines to compile with the model
    123130[-arch_path path]          : path to architecture files (default: $arch_default_path)
     131[-force_compile]           : recompile although there seems to be an on-going compilation
    124132 -arch nom_arch            : target architecture
    125133 exec                      : executable to build
     
    154162          veget="$2" ; shift ; shift ;;
    155163
    156       "-sisvat")
    157           sisvat="$2" ; shift ; shift ;;
    158 
    159164      "-inlandsis")
    160     inlandsis="$2" ; shift ; shift ;;
     165          inlandsis="$2" ; shift ; shift ;;
    161166
    162167      "-rrtm")
    163           rrtm="$2" ; shift ; shift ;;
    164 
    165       "-ecrad")
    166           ecrad="$2" ; shift ; shift ;;
     168          rrtm="$2" ; if [ "$2" = "false" ] ; then rad="old" ; else rad="rrtm" ; fi ; shift ; shift ;;
     169
     170      "-rad")
     171          rad="$2" ; shift ; shift ;;
    167172
    168173      "-dust")
     
    174179      "-chimie")
    175180          chimie="$2" ; shift ; shift ;;
     181
     182      "-isotopes")
     183          isotopes="$2" ; shift ; shift ;;
     184
     185      "-isoverif")
     186          isoverif="$2" ; shift ; shift ;;
     187
     188      "-diagiso")
     189          diagiso="$2" ; shift ; shift ;;
     190
     191      "-isotrac")
     192          isotrac="$2" ; shift ; shift ;;
    176193
    177194      "-parallel")
     
    199216     
    200217      "-mem")
     218          echo "option -mem is obsolete (now always on in parallel)"
    201219          paramem="mem" ; shift ;;
    202220
     
    227245      "-arch_path")
    228246          arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;;
     247
     248      "-force_compile")
     249          force_compile=true ; shift ;;
    229250
    230251      *)
     
    318339if [[ "${physique:0:5}" == "venus" ]] ; then phys_root=venus ; fi
    319340if [[ "${physique:0:5}" == "titan" ]] ; then phys_root=titan ; fi
    320 if [[ "${physique:0:3}" == "mar" ]] ; then phys_root=mar ; fi
    321341if [[ "${physique:0:3}" == "dev" ]] ; then phys_root=dev ; fi
    322342
     
    347367   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
    348368   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
     369fi
     370
     371if [[ "$isotopes" == "true" ]]
     372then
     373   CPP_KEY="$CPP_KEY ISO"
     374fi
     375
     376if [[ "$isoverif" == "true" ]]
     377then
     378   CPP_KEY="$CPP_KEY ISOVERIF"
     379fi
     380
     381if [[ "$diagiso" == "true" ]]
     382then
     383   CPP_KEY="$CPP_KEY DIAGISO"
     384fi
     385
     386if [[ "$isotrac" == "true" ]]
     387then
     388   CPP_KEY="$CPP_KEY ISOTRAC"
    349389fi
    350390
     
    420460fi
    421461
    422 if [[ "$sisvat" == "true" ]]
    423 then
    424    CPP_KEY="$CPP_KEY CPP_SISVAT"
    425    SISVAT_PATH="$LIBFGCM/%PHYS/sisvat"
    426 fi
    427 
    428462if [[ "$inlandsis" == "true" ]]
    429463then
     
    433467
    434468
    435 if [[ "$rrtm" == "true" ]]
     469if [[ "$rad" == "rrtm" ]]
    436470then
    437471   CPP_KEY="$CPP_KEY CPP_RRTM"
    438    RRTM_PATH="$LIBFGCM/%PHYS/rrtm"
     472   RAD_PATH="$LIBFGCM/%PHYS/rrtm"
     473fi
     474if [[ "$rad" == "ecrad" ]]
     475then
     476   CPP_KEY="$CPP_KEY CPP_ECRAD"
     477   RAD_PATH="$LIBFGCM/%PHYS/ecrad"
    439478fi
    440479
     
    525564if [[ -f dimensions.h ]]
    526565then
    527   echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
    528   echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    529   echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    530   echo  vous pouvez continuer en repondant oui.
    531   echo "Voulez-vous vraiment continuer?"
    532   echo ""
    533   echo "WARNING: you are probably already compiling the model somewhere else."
    534   echo "Wait until the first compilation is finished before launching this one."
    535   echo "If you are sure that you are not compiling elsewhere, just answer "
    536   echo "yes (or 'oui') to the question below to proceed."
    537   echo "Do you wish to continue?"
    538   read reponse
    539   if [[ $reponse == "oui" || $reponse == "yes" ]]
    540   then
    541     \rm -f $LIBFGCM/grid/dimensions.h
    542   else
    543     exit
    544   fi
     566    if [[ $force_compile == true ]]
     567    then
     568        \rm -f $LIBFGCM/grid/dimensions.h
     569    else
     570        echo "WARNING: you are probably already compiling the model somewhere else."
     571        echo "Wait until the first compilation is finished before launching this one."
     572        echo "If you are sure that you are not compiling elsewhere, "
     573        echo "run makelmdz_fcm with option -force_compile"
     574        exit 1
     575    fi
    545576fi
    546577
     
    671702fi
    672703
     704if [[ "$isotopes" == "true" ]]
     705then
     706  SUFF_NAME=${SUFF_NAME}_iso
     707fi
     708if [[ "$isoverif" == "true" ]]
     709then
     710  SUFF_NAME=${SUFF_NAME}_isoverif
     711fi
     712if [[ "$isotrac" == "true" ]]
     713then
     714  SUFF_NAME=${SUFF_NAME}_isotrac
     715fi
     716if [[ "$diagiso" == "true" ]]
     717then
     718  SUFF_NAME=${SUFF_NAME}_diagiso
     719fi
     720
    673721if [[ $libphy == "true" ]]
    674722then
     
    707755echo "%DYN_PHYS      $DYN_PHYS_PATH" >> $config_fcm
    708756echo "%DYN_PHYS_SUB  $DYN_PHYS_SUB_PATH" >> $config_fcm
    709 echo "%RRTM          $RRTM_PATH"     >> $config_fcm
     757echo "%RAD           $RAD_PATH"     >> $config_fcm
    710758echo "%ECRAD         $ECRAD_PATH"    >> $config_fcm
    711759echo "%DUST          $DUST_PATH"     >> $config_fcm
    712760echo "%STRATAER      $STRATAER_PATH" >> $config_fcm
    713 echo "%SISVAT        $SISVAT_PATH"   >> $config_fcm
    714761echo "%INLANDSIS     $INLANDSIS_PATH" >> $config_fcm
    715762echo "%COSP          $COSP_PATH"     >> $config_fcm
     
    732779fi
    733780
     781set +e
     782
    734783rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock
    735784./build_gcm ${fcm_path} -j $job $full
     785build_status=$?
    736786
    737787err=$?
     
    752802  \rm -f $LIBFGCM/grid/dimensions.h
    753803fi
     804
     805exit $build_status
Note: See TracChangeset for help on using the changeset viewer.