Changeset 5958 for CONFIG/UNIFORM


Ignore:
Timestamp:
10/22/21 15:43:47 (3 years ago)
Author:
acosce
Message:

add option in compilation script

  • ico_only : to compile only ico grid
  • reg_only : to compile only reg grid
  • ce0l : to activate compilation of create_etat0_limit (+ gcm.e)
File:
1 edited

Legend:

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

    r5907 r5958  
    3030full_orch="" 
    3131full_dyna="" 
     32ico_only=no 
     33reg_only=no 
     34ce0l=no 
    3235optchimie=GES 
    3336resol_atm="144x142x79" 
     
    7376./compile_icolmdzorinca.sh -chimie DUSS  
    7477 
     78Example 6: Compile only ico grid  
     79./compile_icolmdzorinca.sh -ico_only 
     80 
     81Example 7: Compile only reg grid  
     82./compile_icolmdzorinca.sh -reg_only 
     83 
     84Example 8 : compile create_etat0_limit (and gcm.e)  
     85./compile_icolmdzorinca.sh -ce0l 
    7586 
    7687end_help 
     
    89100        "-full_orch")       full_orch="-full"  ; shift ;; 
    90101        "-full_dyna")       full_dyna="-full"  ; shift ;; 
     102        "-ico_only")        ico_only=yes  ; shift ;; 
     103        "-reg_only")        reg_only=yes  ; shift ;; 
     104        "-ce0l")            ce0l=yes  ; shift ;; 
    91105        "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 
    92106        "-chimie")          optchimie=$2; shift ; shift;; 
     
    258272## 2.4 Compile lmdz 
    259273cd $modipsl/modeles/LMDZ 
    260 # Compile LMDZ as library to couple to DYNAMICO 
    261 echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" 
    262 echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile  
    263  
    264 # Check if the compilation of LMDZ was previsouly interupted prematured.  
    265 # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
    266 # to ask question and wait for interactivly answer from the user. 
    267 if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
    268   echo >> $outfile 
    269   echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
    270   echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
    271   echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
    272   echo >> $outfile 
    273   rm -f libf/grid/dimensions.h 
    274   rm -f .lock 
    275 fi 
    276  
    277 echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile  
    278      ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1 
    279 # Test if compiling finished 
    280 if [[ $? != 0 ]] ; then 
    281     echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP" 
    282     echo "ALL INFORMATION IN FILE $outfile" 
    283     exit 
    284 fi 
     274 
     275if [ $reg_only = no ] ; then  
     276 
     277    # Compile LMDZ as library to couple to DYNAMICO 
     278    echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" 
     279    echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile  
     280 
     281    # Check if the compilation of LMDZ was previsouly interupted prematured.  
     282    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
     283    # to ask question and wait for interactivly answer from the user. 
     284    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
     285        echo >> $outfile 
     286        echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
     287        echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
     288        echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
     289        echo >> $outfile 
     290        rm -f libf/grid/dimensions.h 
     291        rm -f .lock 
     292    fi 
     293 
     294    echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile  
     295    ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1 
     296    # Test if compiling finished 
     297    if [[ $? != 0 ]] ; then 
     298        echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP" 
     299        echo "ALL INFORMATION IN FILE $outfile" 
     300        exit 
     301    fi 
    285302 
    286303 
    287304## 2.5 Compile DYNAMICO 
    288 cd $modipsl/modeles/DYNAMICO 
    289 echo; echo "NOW COMPILE DYNAMICO " 
    290 echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile  
    291  
    292 echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile  
    293      ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1 
    294 # Test if compiling finished 
    295 if [[ $? != 0 ]] ; then 
    296     echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP" 
    297     echo "ALL INFORMATION IN FILE $outfile" 
    298     exit 
    299 fi 
    300  
    301 ## 2.6 Compile interface ICOSA_LMDZ 
    302 cd $modipsl/modeles/ICOSA_LMDZ 
    303 echo; echo "NOW COMPILE ICOSA_LMDZ " 
    304 echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile  
    305  
    306 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile  
    307      ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1 
    308 # Test if compiling finished 
    309 if [[ $? != 0 ]] ; then 
    310     echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP" 
    311     echo "ALL INFORMATION IN FILE $outfile" 
    312     exit 
    313 fi 
    314 # Move executables to modipsl/bin 
    315 if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then  
    316     mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}_${optchimie}.exe 
    317 else 
    318     echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP" 
    319     echo "ALL INFORMATION IN FILE $outfile" 
    320     exit 
    321 fi 
    322  
     305    cd $modipsl/modeles/DYNAMICO 
     306    echo; echo "NOW COMPILE DYNAMICO " 
     307    echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile  
     308 
     309    echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile  
     310    ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1 
     311    # Test if compiling finished 
     312    if [[ $? != 0 ]] ; then 
     313        echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP" 
     314        echo "ALL INFORMATION IN FILE $outfile" 
     315        exit 
     316    fi 
     317 
     318    ## 2.6 Compile interface ICOSA_LMDZ 
     319    cd $modipsl/modeles/ICOSA_LMDZ 
     320    echo; echo "NOW COMPILE ICOSA_LMDZ " 
     321    echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile  
     322 
     323    echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile  
     324    ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1 
     325    # Test if compiling finished 
     326    if [[ $? != 0 ]] ; then 
     327        echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP" 
     328        echo "ALL INFORMATION IN FILE $outfile" 
     329        exit 
     330    fi 
     331    # Move executables to modipsl/bin 
     332    if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then  
     333        mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}_${optchimie}.exe 
     334    else 
     335        echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP" 
     336        echo "ALL INFORMATION IN FILE $outfile" 
     337        exit 
     338    fi 
     339fi  
    323340 
    324341 
    325342## 2.7 Compile LMDZ for regular latlon configuration 
    326343 
    327  
    328 cd $modipsl/modeles/LMDZ 
    329 # Compile LMDZ regular lat-lon exectuable 
    330 echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
    331 echo >> $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. 
    336 if [ -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 
    344 fi 
    345 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  
    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 
    348 if [[ $? != 0 ]] ; then 
    349     echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
    350     echo "ALL INFORMATION IN FILE $outfile" 
    351     exit 
    352 fi 
    353  
    354 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
    355 echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 
    356 echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile  
    357  
    358 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  
    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 
    361 if [[ $? != 0 ]] ; then 
    362     echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 
    363     echo "ALL INFORMATION IN FILE $outfile" 
    364     exit 
    365 fi 
     344if [ $ico_only = no ] ; then  
     345    cd $modipsl/modeles/LMDZ 
     346    # Compile LMDZ regular lat-lon exectuable 
     347    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
     348    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile  
     349     
     350    # Check if the compilation of LMDZ was previsouly interupted prematured.  
     351    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
     352    # to ask question and wait for interactivly answer from the user. 
     353    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
     354        echo >> $outfile 
     355        echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
     356        echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
     357        echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
     358        echo >> $outfile 
     359        rm -f libf/grid/dimensions.h 
     360        rm -f .lock 
     361    fi 
     362    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  
     363    ./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 
     364    # Test if compiling finished 
     365    if [[ $? != 0 ]] ; then 
     366        echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 
     367        echo "ALL INFORMATION IN FILE $outfile" 
     368        exit 
     369    fi 
     370fi  
     371 
     372 
     373if [ $ce0l = yes ] ; then  
     374    # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
     375    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 
     376    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile  
     377     
     378    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  
     379    ./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 
     380    # Test if compiling finished 
     381    if [[ $? != 0 ]] ; then 
     382        echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 
     383        echo "ALL INFORMATION IN FILE $outfile" 
     384        exit 
     385    fi 
     386fi  
    366387 
    367388# Find executable suffix 
Note: See TracChangeset for help on using the changeset viewer.