Changeset 6252 for CONFIG


Ignore:
Timestamp:
09/23/22 11:22:30 (18 months ago)
Author:
falletti
Message:

LMDZREPR_v6: update compile.sh to use the new option -rad (based on what was done in IPSLCM6.2/compile_ipslcm6.sh)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZREPR_v6/compile_lmdzrepr.sh

    r5944 r6252  
    2020# Also compile ce0l subprogram to LMDZ (y/n) 
    2121ce0l=n 
     22# choose radiative code compilation option  
     23rad=rrtm 
     24opt_rad="" 
    2225# Without REPROBUS (y/n) 
    2326no_repr=n 
     
    8386./compile_lmdzrepr.sh -custom_suffix my_suffix 
    8487 
     88Example 7: choose radiative schema for LMDZ (oldrad/rrtm/ecrad). Default is rrtm 
     89./compile_lmdzrepr.sh -rad ecrad 
     90 
    8591end_help 
    8692exit;; 
     
    9399        "-resol_atm")       resol_atm=$2 ; shift ; shift ;; 
    94100        "CE0L")             ce0l=y ; shift ;; 
     101    "-rad")             rad=$2; shift ; shift;; 
    95102        "-full")            full_flag="-full"; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;; 
    96103        "-full_xios")       full_xios="--full" ; shift ;;  # Note only full_xios is using double dash: --full 
     
    243250echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
    244251echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
     252# Retrieve the final svn release number, needed for radiative code suffix of executable 
     253lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'` 
    245254 
    246255# Check if the compilation of LMDZ was previsouly interupted prematured.  
     
    257266fi 
    258267 
     268# Need to define the proper option for radiative code compilation. By default, we use rrtm 
     269case $rad in 
     270    oldrad) opt_rad="" ;; 
     271    rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;; 
     272    ecrad)  opt_rad="-rad ecrad" ;; 
     273    *) echo Only oldrad rrtm ecrad for rad option ; exit 
     274esac 
     275 
     276if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi 
     277 
     278 
    259279if [ $no_repr == y ] ; then 
    260280    echo "COMPILING LMDZ ONLY (no Reprobus)" 
    261281    echo >> $outfile ; echo "COMPILING LMDZ (no Reprobus)"   >> $outfile 
    262     echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile  
    263     ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     282    echo ./makelmdz_fcm -d ${resol_atm} -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile  
     283    ./makelmdz_fcm -d ${resol_atm} -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    264284else 
    265285    echo "COMPILING LMDZ WITH REPROBUS" 
    266286    echo >> $outfile ; echo "COMPILING LMDZ WITH REPROBUS"  >> $outfile 
    267     echo ./makelmdz_fcm -ext_src ../REPROBUS -cpp REPROBUS -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile  
    268     ./makelmdz_fcm -ext_src ../REPROBUS -cpp REPROBUS -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     287    echo ./makelmdz_fcm -ext_src ../REPROBUS -cpp REPROBUS -d ${resol_atm} -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile  
     288    ./makelmdz_fcm -ext_src ../REPROBUS -cpp REPROBUS -d ${resol_atm} -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -cosp true -v false -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    269289fi 
    270290# Test if compiling finished 
     
    282302 
    283303# Find executable suffix 
     304suffix=_${resol_atm}_phylmd 
     305if [ $lmdzsvn -ge 4186 ] ; then suffix=${suffix}_${rad} ; fi 
    284306if [ $parallel == seq ] || [ $parallel == none ] ; then 
    285     suffix=_${resol_atm}_phylmd_seq.e 
     307    suffix=${suffix}_seq.e 
    286308else 
    287     suffix=_${resol_atm}_phylmd_para_mem.e 
     309    suffix=${suffix}_para_mem.e 
    288310fi 
    289311echo gcm suffix = $suffix 
     
    303325 
    304326# Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
     327# NOT TESTED YET!!! 
    305328if [ $ce0l == y ] ; then 
    306329    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 
Note: See TracChangeset for help on using the changeset viewer.