Ignore:
Timestamp:
07/13/23 14:13:57 (10 months ago)
Author:
acosce
Message:

Modification of compilation script, to compile with Inca we need to choose ESMCHEM + -chimie (default is AER)

Add experiments with Inca in IPSLCM6.3

  • EXPERIMENTS/IPSLESM/AER to run a couple with aerosol interactif
  • EXPERIMENTS/LMDZORINCA/GES to run a simulation without ocean and with GES INCA chemistry
Location:
CONFIG/UNIFORM/v6/IPSLCM6.3
Files:
25 added
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/IPSLCM6.3/compile_ipslcm6.sh

    r6533 r6550  
    3131rad=rrtm 
    3232opt_rad="" 
     33# choose inca chemistry 
     34optchimie=AER 
    3335 
    3436# Optimization mode 
     
    7072Options: [LR / VLR / MR1 / MR025] Model resolution, choose only one. Default: LR. 
    7173         [ESMCO2] Compile IPSLCM6 for CO2 interactif ocean/atmosphere. 
    72          [ESMAER] Compile IPSLCM6 for AER interactif on atmosphere 
    73          [ESMCO2AER] Compile IPSLCM6 for both interactive CO2 and AER, and also with transfer of species from PISCES to INCA. 
     74         [ESMCHEM] Compile IPSLCM6 for chemistry interactif on atmosphere 
     75         [ESMCO2AER] Compile IPSLCM6 for both interactive CO2 and chemistry, and also with transfer of species from PISCES to INCA. 
    7476         [-full] Full recompilation of all components. This option can be added to all other options. 
    7577         [-cleannemo] Full recompilation of NEMO component  only. 
     
    99101Example 7: choose radiative schema for LMDZ (oldrad/rrtm/ecrad). Default is rrtm 
    100102./compile_ipslcm6.sh MR025 -rad ecrad 
     103 
     104Example 8: Compilation of IPSLCM6 for ESM with INCA chemistry (default CHEMISTRY=AER) 
     105./compile_ipslcm6.sh ESMCHEM 
     106 
     107Example 9: Compilation of IPSLCM6 for ESM with INCA chemistry and choose the chemistry  
     108./compile_ipslcm6.sh ESMCHEM -chimie GES 
    101109 
    102110 
     
    108116        "MR025")       resol_atm=256x256x79; resol_oce=ORCA025 ; icemodel=lim3; oceanbio=n;   shift ;; 
    109117        "ESMCO2")      esmco2=y;  shift ;;  
    110         "ESMAER")      esmaer=y; shift ;;  
    111         "ESMCO2AER")   esmco2=y; esmaer=y; shift ;; 
     118        "ESMCHEM")      esmchem=y; shift ;;  
     119        "ESMCO2AER")   esmco2=y; esmchem=y; shift ;; 
    112120        "CE0L")        ce0l=y ; shift ;; 
    113121        "-rad")        rad=$2; shift ; shift;; 
     
    124132        "-full_inca")  full_inca="-clean"; shift ;; 
    125133        "-cleannemo")  full_nemo=y ; shift ;; 
     134        "-chimie")     optchimie=$2; shift ; shift;; 
     135 
    126136        *)             echo "unknown option "$1" , exiting..." ; exit 
    127137    esac 
     
    130140echo "Following options are set in current compiling:" >> $outfile 
    131141echo "   resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, oceanbio=${oceanbio}" >> $outfile  
    132 echo "   esmco2=${esmco2}, esmaer=${esmaer}" >> $outfile  
     142echo "   esmco2=${esmco2}, esmchem=${esmchem}, chemistry=${optchimie}" >> $outfile  
    133143echo "   ce0l=${ce0l}" >> $outfile  
    134144echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile  
     
    282292   if [ ${oceanbio} == y ] ; then 
    283293      if [ ${esmco2} == y ] ; then 
    284         if [ ${esmaer} == y ] ; then 
     294        if [ ${esmchem} == y ] ; then 
    285295           delkeys="key_nosignedzero key_mpp_rep" 
    286296        else 
     
    340350 
    341351if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then 
    342     if [ ${esmco2} == y ] && [ ${esmaer} == n ] ;  then  
     352    if [ ${esmco2} == y ] && [ ${esmchem} == n ] ;  then  
    343353        mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCO2_${resol_oce}_${optmode} 
    344     elif [ ${esmco2} == y ] && [ ${esmaer} == y ] ;  then 
     354    elif [ ${esmco2} == y ] && [ ${esmchem} == y ] ;  then 
    345355    mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCO2AER_${resol_oce}_${optmode} 
    346356    else 
     
    352362## 2.6 Compile LMDZ for regular latlon configuration 
    353363# If necessary compile INCA modele with AER configuration  
    354 if [ ${esmaer} == y ] ;  then  
     364if [ ${esmchem} == y ] ;  then  
    355365    cd $modipsl/modeles/INCA 
    356366    #compile INCA regulat lat_lon chimie library  
    357367    echo; echo "NOW COMPILE INCA AER on resolution = ${resol_atm}" 
    358368    if [ ${esmco2} == y ] ; then 
    359       echo ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 
    360       ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag $full_inca -cplocninca >> $outfile 2>&1 
     369      echo ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 
     370           ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag $full_inca -cplocninca >> $outfile 2>&1 
    361371    else 
    362       echo ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca >> $outfile  
    363       ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag $full_inca >> $outfile 2>&1 
     372      echo ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca >> $outfile  
     373           ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag $full_inca >> $outfile 2>&1 
    364374    fi 
    365375    # Test if compiling finished 
     
    370380 
    371381    echo "Move inca.dat modipsl/bin" 
    372     if [[ -f $modipsl/modeles/INCA/SIMULATIONS/AER/inca.dat ]] ;  then   
    373         mv $modipsl/modeles/INCA/SIMULATIONS/AER/inca.dat $modipsl/bin/inca_${resol_atm}_${optmode}_AER.dat ; 
     382    if [[ -f $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat ]] ;  then   
     383        mv $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat $modipsl/bin/inca_${optchimie}.dat ; 
    374384    else 
    375385        echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP" 
    376386        exit     
    377387    fi 
    378          
     388 
     389    echo "Move tracer.def to  modipsl/bin" 
     390    if [[ -f $modipsl/modeles/INCA/tracer.def ]] ;  then 
     391        mv $modipsl/modeles/INCA/tracer.def $modipsl/bin/tracer_${optchimie}.def ; 
     392    fi 
     393 
     394 
     395     
    379396fi  
    380397 
     
    384401echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
    385402echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
    386 # Retrieve the final svn release number, needed for radiative code suffix of executable 
    387 lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'` 
    388 echo >> $outfile ; echo "lmdzsvn= $lmdzsvn "   >> $outfile 
    389403 
    390404# Check if the compilation of LMDZ was previsouly interupted prematured.  
     
    404418case $rad in 
    405419    oldrad) opt_rad="" ;; 
    406     rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;; 
     420    rrtm)    opt_rad="-rad rrtm" ;; 
    407421    ecrad)  opt_rad="-rad ecrad" ;; 
    408422    *) echo Only oldrad rrtm ecrad for rad option ; exit 
    409423esac 
    410424 
    411 if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi 
    412  
    413  
    414 if [ ${esmaer} == n ] ;  then 
     425 
     426 
     427if [ ${esmchem} == n ] ;  then 
    415428    echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
    416     ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     429         ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    417430else 
    418431    #in esm aer case add chemistry option to lmdz compilation 
    419432    if [ ${esmco2} == y ] ; then 
    420433      echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -cplocninca -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
    421       ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -cplocninca -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     434           ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -cplocninca -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    422435    else 
    423436      echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
    424       ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     437           ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    425438    fi 
    426439fi 
     
    444457 
    445458suffix=_${resol_atm}_phylmd 
    446 if [ $lmdzsvn -ge 4186 ] ; then suffix=${suffix}_${rad} ; fi 
     459suffix=${suffix}_${rad}  
    447460suffix=${suffix}_para_mem_orch_couple 
    448 if [ ${esmaer} == n ] ;  then  
     461if [ ${esmchem} == n ] ;  then  
    449462    suffix=${suffix}.e 
    450463else 
     
    455468 
    456469if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then  
    457     if [ ${esmaer} == n ] ;  then  
     470    if [ ${esmchem} == n ] ;  then  
    458471        mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e 
    459472    else 
    460         mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_AER.e 
     473        mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_${optchimie}.e 
    461474    fi 
    462475else 
Note: See TracChangeset for help on using the changeset viewer.