Changeset 6210


Ignore:
Timestamp:
08/01/22 12:13:05 (21 months ago)
Author:
acosce
Message:

update compilation script to include new lmdz option : rad. Try to propose retrocompatibility
remove xios from ce0l compilation

File:
1 edited

Legend:

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

    r5644 r6210  
    2828# Also compile ce0l subprogram to LMDZ (y/n) 
    2929ce0l=n 
     30# choose radiative code compilation option  
     31rad=rrtm 
     32opt_rad="" 
    3033 
    3134# Optimization mode 
     
    9497./compile_ipslcm6.sh MR025 -debug -full 
    9598 
     99Example 7: choose radiative schema for LMDZ (oldrad/rrtm/ecrad). Default is rrtm 
     100./compile_ipslcm6.sh MR025 -rad ecrad 
     101 
     102 
    96103end_help 
    97104exit;; 
     
    104111        "ESMCO2AER")   esmco2=y; esmaer=y; shift ;; 
    105112        "CE0L")        ce0l=y ; shift ;; 
     113        "-rad")        rad=$2; shift;; 
    106114        "-parallel")   parallel=$2 ; shift ; shift ;;  
    107115        "-arch")       fcm_arch="$2" ; shift ; shift ;; 
     
    362370echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
    363371echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
     372# Retrieve the final svn release number, needed for radiative code suffix of executable 
     373lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'` 
    364374 
    365375# Check if the compilation of LMDZ was previsouly interupted prematured.  
     
    376386fi 
    377387 
     388# Need to define the proper option for radiative code compilation. By default, we use rrtm 
     389case $rad in 
     390    oldrad) opt_rad="" ;; 
     391    rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;; 
     392    ecrad)  opt_rad="-rad ecrad" ;; 
     393    *) echo Only oldrad rrtm ecrad for rad option ; exit 
     394esac 
     395 
    378396if [ ${esmaer} == n ] ;  then 
    379     echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
    380     ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     397    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 
     398    ./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 
    381399else 
    382400    #in esm aer case add chemistry option to lmdz compilation 
    383     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 
    384     ./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 
     401    echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
     402    ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$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 
    385403fi 
    386404 
     
    391409fi 
    392410 
     411 
     412 
     413 
    393414# Move executables to modipsl/bin folder 
    394415echo >> $outfile 
     
    397418ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile 
    398419echo >> $outfile 
     420 
     421 
     422suffix=_${resol_atm}_phylmd 
     423if [ $lmdzsvn -ge 4186 ] ; then suffix=${suffix}_${rad} ; fi 
     424suffix=${suffix}_para_mem_orch_couple 
    399425if [ ${esmaer} == n ] ;  then  
    400     suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e 
     426    suffix=${suffix}.e 
    401427else 
    402     suffix=_${resol_atm}_phylmd_para_mem_orch_couple_inca.e 
    403 fi 
     428    suffix=${suffix}_inca.e 
     429fi 
     430 
    404431echo gcm suffix = $suffix 
    405432 
     
    417444 
    418445 
     446 
     447 
     448 
    419449# Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
    420450if [ $ce0l == y ] ; then 
     
    422452    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile  
    423453     
    424     echo ./makelmdz_fcm -d ${resol_atm} -rrtm true -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile  
    425     ./makelmdz_fcm -d ${resol_atm} -rrtm true -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1 
     454    echo ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile  
     455    ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1 
     456 
     457# 1er aout - remove xios from ce0l compilation # 
     458#    echo ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile  
     459#    ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1 
     460 
    426461    # Test if compiling finished 
    427462    if [[ $? != 0 ]] ; then 
     
    437472    ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile 
    438473    echo >> $outfile 
    439 #    suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e 
     474 
    440475    suffix=_${resol_atm}_phylmd_seq.e 
     476    if [ $lmdzsvn -ge 4186 ] ; then suffix=_${resol_atm}_phylmd_${rad}_seq.e ; fi 
    441477    echo ce0l suffix = $suffix 
    442478 
Note: See TracChangeset for help on using the changeset viewer.