Changeset 5907


Ignore:
Timestamp:
08/05/21 12:10:25 (3 years ago)
Author:
acosce
Message:

update compile script for ICOLMDZORINCA config
now regular and ico grid will be systematically compile
defaut resolution is 144x142x79 for regular grid. Use regular_latlon option to modify it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v7/ICOLMDZORINCA_v7/compile_icolmdzorinca.sh

    r5705 r5907  
    3131full_dyna="" 
    3232optchimie=GES 
     33resol_atm="144x142x79" 
    3334 
    3435# Default netcdf_lib is used for XIOS but can be change by argument 
     
    3940outfile=$submitdir/out_compile_icolmdzorinca.$datestr 
    4041echo > $outfile 
    41 echo; echo "Text output from compilation will be stored in file out_compile_icolmdzor.$datestr"; echo  
     42echo; echo "Text output from compilation will be stored in file out_compile_icolmdzorinca.$datestr"; echo  
    4243 
    4344#### Read arguments  
     
    323324 
    324325## 2.7 Compile LMDZ for regular latlon configuration 
    325 if [ $regular_latlon = yes ] ; then 
    326  
    327     cd $modipsl/modeles/LMDZ 
    328     # Compile LMDZ regular lat-lon exectuable 
    329     echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
    330     echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
    331  
    332     # Check if the compilation of LMDZ was previsouly interupted prematured.  
    333     # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
    334     # to ask question and wait for interactivly answer from the user. 
    335     if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
    336         echo >> $outfile 
    337         echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
    338         echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
    339         echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
    340         echo >> $outfile 
    341         rm -f libf/grid/dimensions.h 
    342         rm -f .lock 
    343     fi 
    344     echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile  
    345          ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1 
    346     # Test if compiling finished 
    347     if [[ $? != 0 ]] ; then 
    348         echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
    349         echo "ALL INFORMATION IN FILE $outfile" 
    350         exit 
    351     fi 
    352  
    353     # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
    354     echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 
    355     echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile  
    356  
    357     echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile  
    358          ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 2>&1 
    359     # Test if compiling finished 
    360     if [[ $? != 0 ]] ; then 
    361         echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 
    362         echo "ALL INFORMATION IN FILE $outfile" 
    363         exit 
    364     fi 
    365  
    366     # Find executable suffix 
    367     if [ $parallel == seq ] || [ $parallel == none ] ; then 
    368         suffix=_${resol_atm}_phylmd_seq_orch_inca.e 
    369     else 
    370         suffix=_${resol_atm}_phylmd_para_mem_orch_inca.e 
    371     fi 
    372     echo gcm suffix = $suffix 
    373      
    374     # Move executables to modipsl/bin folder 
    375     echo "Move gcm.e and ce0l executable to modipsl/bin" 
    376     if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then 
    377         mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_${optchimie}.e 
    378     else 
    379         echo "ERROR gcm${suffix} executable does not exist."  
    380         echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
    381         echo "ALL INFORMATION IN FILE $outfile" 
    382         exit 
    383     fi 
    384  
    385     if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then 
    386         mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}_${optchimie}.e 
    387     else 
    388         echo "ERROR ce0l${suffix} executable does not exist."  
    389         echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
    390         echo "ALL INFORMATION IN FILE $outfile" 
    391         exit 
    392     fi 
    393 fi 
     326 
     327 
     328cd $modipsl/modeles/LMDZ 
     329# Compile LMDZ regular lat-lon exectuable 
     330echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
     331echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
     332 
     333# Check if the compilation of LMDZ was previsouly interupted prematured.  
     334# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
     335# to ask question and wait for interactivly answer from the user. 
     336if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
     337    echo >> $outfile 
     338    echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
     339    echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
     340    echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
     341    echo >> $outfile 
     342    rm -f libf/grid/dimensions.h 
     343    rm -f .lock 
     344fi 
     345echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile  
     346./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1 
     347# Test if compiling finished 
     348if [[ $? != 0 ]] ; then 
     349    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
     350    echo "ALL INFORMATION IN FILE $outfile" 
     351    exit 
     352fi 
     353 
     354# Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
     355echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 
     356echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile  
     357 
     358echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile  
     359./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 2>&1 
     360# Test if compiling finished 
     361if [[ $? != 0 ]] ; then 
     362    echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 
     363    echo "ALL INFORMATION IN FILE $outfile" 
     364    exit 
     365fi 
     366 
     367# Find executable suffix 
     368if [ $parallel == seq ] || [ $parallel == none ] ; then 
     369    suffix=_${resol_atm}_phylmd_seq_orch_inca.e 
     370else 
     371    suffix=_${resol_atm}_phylmd_para_mem_orch_inca.e 
     372fi 
     373echo gcm suffix = $suffix 
     374 
     375# Move executables to modipsl/bin folder 
     376echo "Move gcm.e and ce0l executable to modipsl/bin" 
     377if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then 
     378    mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_${optchimie}.e 
     379else 
     380    echo "ERROR gcm${suffix} executable does not exist."  
     381    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
     382    echo "ALL INFORMATION IN FILE $outfile" 
     383    exit 
     384fi 
     385 
     386if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then 
     387    mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}_${optchimie}.e 
     388else 
     389    echo "ERROR ce0l${suffix} executable does not exist."  
     390    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
     391    echo "ALL INFORMATION IN FILE $outfile" 
     392    exit 
     393fi 
     394 
    394395 
    395396 
Note: See TracChangeset for help on using the changeset viewer.