Changeset 6787


Ignore:
Timestamp:
03/28/24 13:26:31 (4 weeks ago)
Author:
jgipsl
Message:

Add option to compress XIOS and LMDZ/libo in tar files after compilation. By default compression is done but can be deactivated with option -notar.
See -h for more information. Done by Karine Laurent

Location:
CONFIG/UNIFORM/v6
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/compile_lmdzor.sh

    r6684 r6787  
    4343netcdf_lib="" 
    4444 
     45## Arguments in order to compress temporary files after compilation 
     46tar=no 
     47comp_tar=yes 
     48 
    4549# Output text file for compilation of each component 
    4650datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` 
     
    6165./compile_config [Options]  
    6266 
    63 Options: -full, -resol_atm, -debug, -dev, -prod(default) 
     67Options:  
     68  [-full]: full recompilation of all components  
     69  [-debug], [-dev], [-prod](default): use compilation options for debug, dev or production mode, only one option can be used 
     70  [-resol_atm]: set resolution of LMDZ in regular mode 
     71  [-tar]: option to compress XIOS and/or LMDZ/libo repositories that takes many inodes without compilation 
     72  [-comp_tar]: option to compile and compress XIOS and LMDZ/libo repositories if compilation succed (default option) 
     73  [-notar]: do not compress XIOS and LMDZ/libo repositories 
    6474 
    6575Example 1: Default compilation of LMDZ-ORCHIDEE with XIOS and IOIPSL 
     
    7585The dimension can be changed to any other 3d dimension. 
    7686./compile_lmdzor.sh -resol_atm 96x95x79 
     87 
     88Example 5: Compile without compressing XIOS and LMDZ/libo in tar files 
     89./compile_lmdzor.sh -notar 
    7790 
    7891end_help 
     
    94107        "-full_orch")       full_orch="-full"  ; shift ;; 
    95108        "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 
     109        "-tar")             tar=yes ; shift ;; 
     110        "-comp_tar")        comp_tar=yes ; shift ;; 
     111        "-notar")           comp_tar=no ; shift ;; 
    96112        *)                  echo "unknown option "$1" , exiting..." ; exit  
    97113    esac 
     
    103119echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile  
    104120echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch" >> $outfile  
     121echo "   tar=$tar, comp_tar=$comp_tar" >> $outfile 
    105122echo >> $outfile 
    106123 
     
    112129    opt_cosp="" 
    113130fi 
     131 
     132 
     133# Compress XIOS and LMDZ/libo without compiling if tar=yes 
     134if [ $tar == yes ] ; then 
     135    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." 
     136    echo >> $outfile 
     137    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." >> $outfile 
     138    if [[ -d $modipsl/modeles/XIOS ]] ; then 
     139        echo " Now tar XIOS repository" 
     140        echo " Now tar XIOS repository" >> $outfile 
     141        tar -cf $modipsl/modeles/XIOS.tar $modipsl/modeles/XIOS 
     142        rm -rf $modipsl/modeles/XIOS 
     143    else 
     144        echo " No XIOS repository to compress" 
     145        echo " No XIOS repository to compress" >> $outfile 
     146    fi 
     147 
     148    if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     149        echo "Now tar LMDZ/libo repository" 
     150        echo "Now tar LMDZ/libo repository" >> $outfile 
     151        tar -cf $modipsl/modeles/LMDZ/libo.tar $modipsl/modeles/LMDZ/libo 
     152        rm -rf $modipsl/modeles/LMDZ/libo 
     153    else 
     154        echo " No LMDZ/libo repository to compress" 
     155        echo " No LMDZ/libo repository to compress" >> $outfile 
     156    fi 
     157         
     158    echo "END OF SCRIPT" 
     159    echo "END OF SCRIPT" >> $outfile 
     160    exit 
     161fi 
     162 
    114163### Read host dependent default values 
    115164### These variables will not be changed if they were set as argument 
     
    181230fi 
    182231 
     232 
    183233#### 2 Do the compilation  
    184234## 2.1 Compile ioipsl 
     
    203253 
    204254## 2.2 Compile xios 
     255 
     256echo; echo "NOW DECOMPRESS XIOS IF NEEDED" 
     257# First check if XIOS needs to be decompressed 
     258# In priority search for modeles/XIOS_${optmode}.tar but if it doesn't exist take 
     259# the first which is found.  
     260if [[ -d $modipsl/modeles/XIOS ]] ; then 
     261    echo "Found XIOS -> no decompress needs to be do";  >> $outfile 
     262elif [[ -f $modipsl/modeles/XIOS_${optmode}.tar ]]; then 
     263    echo >> $outfile 
     264    echo "Found XIOS_${optmode}.tar -> decompress repository" >> $outfile 
     265    # Do not write "tar -xf ... -C $modipsl/modeles because it's modeles/XIOS that is compressed, not only XIOS/ 
     266    tar -xf $modipsl/modeles/XIOS_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     267elif [[ -f $modipsl/modeles/XIOS_prod.tar ]]; then 
     268    echo >> $outfile 
     269    echo "Found XIOS_prod.tar -> decompress repository" >> $outfile 
     270    tar -xf $modipsl/modeles/XIOS_prod.tar -C $modipsl/ >> $outfile 2>&1 
     271elif [[ -f $modipsl/modeles/XIOS_debug.tar ]]; then 
     272    echo >> $outfile 
     273    echo "Found XIOS_debug.tar -> decompress repository" >> $outfile 
     274    tar -xf $modipsl/modeles/XIOS_debug.tar -C $modipsl/ >> $outfile 2>&1 
     275elif [[ -f $modipsl/modeles/XIOS_dev.tar ]]; then 
     276    echo >> $outfile 
     277    echo "Found XIOS_dev.tar -> decompress repository" >> $outfile 
     278    tar -xf $modipsl/modeles/XIOS_dev.tar -C $modipsl/ >> $outfile 2>&1 
     279elif [[ -f $modipsl/modeles/XIOS.tar ]]; then 
     280    echo >> $outfile 
     281    echo "Found XIOS.tar -> decompress repository" >> $outfile 
     282    tar -xf $modipsl/modeles/XIOS.tar -C $modipsl/ >> $outfile 2>&1 
     283else 
     284    echo "XIOS source code was not found. Exit" 
     285    echo "XIOS source code was not found. Exit" >> $outfile 
     286    exit 
     287fi 
     288 
     289 
    205290cd $modipsl/modeles/XIOS 
    206291echo; echo "NOW COMPILE XIOS" 
     
    255340## 2.4 Compile LMDZ for regular latlon configuration 
    256341cd $modipsl/modeles/LMDZ 
     342 
     343# First check if LMDZ/libo exist or if it could be decompressed 
     344# If neither LMDZ/libo or LMDZ/libo_${optmode}.tar exists, nothing is done. It'll be created 
     345# during the compilation. 
     346echo; echo "NOW DECOMPRESS LMDZ/libo IF NEEDED" 
     347if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     348    echo "Found LMDZ/libo -> no decompress needs to be done"; >> $outfile 
     349elif [[ -f $modipsl/modeles/LMDZ/libo_${optmode}.tar ]]; then 
     350    echo "Found LMDZ/libo_${optmode}.tar -> decompress repository"; >> $outfile 
     351    echo >> $outfile 
     352    tar -xf $modipsl/modeles/LMDZ/libo_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     353fi 
     354 
     355 
    257356# Compile LMDZ regular lat-lon executable 
    258357echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
     
    352451fi 
    353452 
     453# Compress XIOS and LMDZ/libo 
     454if [ $comp_tar == yes ] && [ -d $modipsl/modeles/XIOS ] ; then 
     455    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" 
     456    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" >> $outfile  
     457    tar -cf $modipsl/modeles/XIOS_${optmode}.tar $modipsl/modeles/XIOS 
     458    rm -rf $modipsl/modeles/XIOS 
     459    tar -cf $modipsl/modeles/LMDZ/libo_${optmode}.tar $modipsl/modeles/LMDZ/libo 
     460    rm -rf $modipsl/modeles/LMDZ/libo 
     461fi 
    354462 
    355463echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.3/compile_lmdzor.sh

    r6684 r6787  
    4343netcdf_lib="" 
    4444 
     45## Arguments in order to compress temporary files after compilation 
     46tar=no 
     47comp_tar=yes 
     48 
    4549# Output text file for compilation of each component 
    4650datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` 
     
    6165./compile_config [Options]  
    6266 
    63 Options: -full, -resol_atm, -debug, -dev, -prod(default) 
     67Options:  
     68  [-full]: full recompilation of all components  
     69  [-debug], [-dev], [-prod](default): use compilation options for debug, dev or production mode, only one option can be used 
     70  [-resol_atm]: set resolution of LMDZ in regular mode 
     71  [-tar]: option to compress XIOS and/or LMDZ/libo repositories that takes many inodes without compilation 
     72  [-comp_tar]: option to compile and compress XIOS and LMDZ/libo repositories if compilation succed (default option) 
     73  [-notar]: do not compress XIOS and LMDZ/libo repositories 
    6474 
    6575Example 1: Default compilation of LMDZ-ORCHIDEE with XIOS and IOIPSL 
     
    7585The dimension can be changed to any other 3d dimension. 
    7686./compile_lmdzor.sh -resol_atm 96x95x79 
     87 
     88Example 5: Compile without compressing XIOS and LMDZ/libo in tar files 
     89./compile_lmdzor.sh -notar 
    7790 
    7891end_help 
     
    94107        "-full_orch")       full_orch="-full"  ; shift ;; 
    95108        "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 
     109        "-tar")             tar=yes ; shift ;; 
     110        "-comp_tar")        comp_tar=yes ; shift ;; 
     111        "-notar")           comp_tar=no ; shift ;; 
    96112        *)                  echo "unknown option "$1" , exiting..." ; exit  
    97113    esac 
     
    103119echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile  
    104120echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch" >> $outfile  
     121echo "   tar=$tar, comp_tar=$comp_tar" >> $outfile 
    105122echo >> $outfile 
    106123 
     
    112129    opt_cosp="" 
    113130fi 
     131 
     132 
     133# Compress XIOS and LMDZ/libo without compiling if tar=yes 
     134if [ $tar == yes ] ; then 
     135    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." 
     136    echo >> $outfile 
     137    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." >> $outfile 
     138    if [[ -d $modipsl/modeles/XIOS ]] ; then 
     139        echo " Now tar XIOS repository" 
     140        echo " Now tar XIOS repository" >> $outfile 
     141        tar -cf $modipsl/modeles/XIOS.tar $modipsl/modeles/XIOS 
     142        rm -rf $modipsl/modeles/XIOS 
     143    else 
     144        echo " No XIOS repository to compress" 
     145        echo " No XIOS repository to compress" >> $outfile 
     146    fi 
     147 
     148    if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     149        echo "Now tar LMDZ/libo repository" 
     150        echo "Now tar LMDZ/libo repository" >> $outfile 
     151        tar -cf $modipsl/modeles/LMDZ/libo.tar $modipsl/modeles/LMDZ/libo 
     152        rm -rf $modipsl/modeles/LMDZ/libo 
     153    else 
     154        echo " No LMDZ/libo repository to compress" 
     155        echo " No LMDZ/libo repository to compress" >> $outfile 
     156    fi 
     157         
     158    echo "END OF SCRIPT" 
     159    echo "END OF SCRIPT" >> $outfile 
     160    exit 
     161fi 
     162 
    114163### Read host dependent default values 
    115164### These variables will not be changed if they were set as argument 
     
    181230fi 
    182231 
     232 
    183233#### 2 Do the compilation  
    184234## 2.1 Compile ioipsl 
     
    203253 
    204254## 2.2 Compile xios 
     255 
     256echo; echo "NOW DECOMPRESS XIOS IF NEEDED" 
     257# First check if XIOS needs to be decompressed 
     258# In priority search for modeles/XIOS_${optmode}.tar but if it doesn't exist take 
     259# the first which is found.  
     260if [[ -d $modipsl/modeles/XIOS ]] ; then 
     261    echo "Found XIOS -> no decompress needs to be do";  >> $outfile 
     262elif [[ -f $modipsl/modeles/XIOS_${optmode}.tar ]]; then 
     263    echo >> $outfile 
     264    echo "Found XIOS_${optmode}.tar -> decompress repository" >> $outfile 
     265    # Do not write "tar -xf ... -C $modipsl/modeles because it's modeles/XIOS that is compressed, not only XIOS/ 
     266    tar -xf $modipsl/modeles/XIOS_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     267elif [[ -f $modipsl/modeles/XIOS_prod.tar ]]; then 
     268    echo >> $outfile 
     269    echo "Found XIOS_prod.tar -> decompress repository" >> $outfile 
     270    tar -xf $modipsl/modeles/XIOS_prod.tar -C $modipsl/ >> $outfile 2>&1 
     271elif [[ -f $modipsl/modeles/XIOS_debug.tar ]]; then 
     272    echo >> $outfile 
     273    echo "Found XIOS_debug.tar -> decompress repository" >> $outfile 
     274    tar -xf $modipsl/modeles/XIOS_debug.tar -C $modipsl/ >> $outfile 2>&1 
     275elif [[ -f $modipsl/modeles/XIOS_dev.tar ]]; then 
     276    echo >> $outfile 
     277    echo "Found XIOS_dev.tar -> decompress repository" >> $outfile 
     278    tar -xf $modipsl/modeles/XIOS_dev.tar -C $modipsl/ >> $outfile 2>&1 
     279elif [[ -f $modipsl/modeles/XIOS.tar ]]; then 
     280    echo >> $outfile 
     281    echo "Found XIOS.tar -> decompress repository" >> $outfile 
     282    tar -xf $modipsl/modeles/XIOS.tar -C $modipsl/ >> $outfile 2>&1 
     283else 
     284    echo "XIOS source code was not found. Exit" 
     285    echo "XIOS source code was not found. Exit" >> $outfile 
     286    exit 
     287fi 
     288 
     289 
    205290cd $modipsl/modeles/XIOS 
    206291echo; echo "NOW COMPILE XIOS" 
     
    255340## 2.4 Compile LMDZ for regular latlon configuration 
    256341cd $modipsl/modeles/LMDZ 
     342 
     343# First check if LMDZ/libo exist or if it could be decompressed 
     344# If neither LMDZ/libo or LMDZ/libo_${optmode}.tar exists, nothing is done. It'll be created 
     345# during the compilation. 
     346echo; echo "NOW DECOMPRESS LMDZ/libo IF NEEDED" 
     347if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     348    echo "Found LMDZ/libo -> no decompress needs to be done"; >> $outfile 
     349elif [[ -f $modipsl/modeles/LMDZ/libo_${optmode}.tar ]]; then 
     350    echo "Found LMDZ/libo_${optmode}.tar -> decompress repository"; >> $outfile 
     351    echo >> $outfile 
     352    tar -xf $modipsl/modeles/LMDZ/libo_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     353fi 
     354 
     355 
    257356# Compile LMDZ regular lat-lon executable 
    258357echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
     
    352451fi 
    353452 
     453# Compress XIOS and LMDZ/libo 
     454if [ $comp_tar == yes ] && [ -d $modipsl/modeles/XIOS ] ; then 
     455    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" 
     456    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" >> $outfile  
     457    tar -cf $modipsl/modeles/XIOS_${optmode}.tar $modipsl/modeles/XIOS 
     458    rm -rf $modipsl/modeles/XIOS 
     459    tar -cf $modipsl/modeles/LMDZ/libo_${optmode}.tar $modipsl/modeles/LMDZ/libo 
     460    rm -rf $modipsl/modeles/LMDZ/libo 
     461fi 
    354462 
    355463echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.4/compile_lmdzor.sh

    r6758 r6787  
    4343netcdf_lib="" 
    4444 
     45## Arguments in order to compress temporary files after compilation 
     46tar=no 
     47comp_tar=yes 
     48 
    4549# Output text file for compilation of each component 
    4650datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` 
     
    6165./compile_config [Options]  
    6266 
    63 Options: -full, -resol_atm, -debug, -dev, -prod(default) 
     67Options:  
     68  [-full]: full recompilation of all components  
     69  [-debug], [-dev], [-prod](default): use compilation options for debug, dev or production mode, only one option can be used 
     70  [-resol_atm]: set resolution of LMDZ in regular mode 
     71  [-tar]: option to compress XIOS and/or LMDZ/libo repositories that takes many inodes without compilation 
     72  [-comp_tar]: option to compile and compress XIOS and LMDZ/libo repositories if compilation succed (default option) 
     73  [-notar]: do not compress XIOS and LMDZ/libo repositories 
    6474 
    6575Example 1: Default compilation of LMDZ-ORCHIDEE with XIOS and IOIPSL 
     
    7585The dimension can be changed to any other 3d dimension. 
    7686./compile_lmdzor.sh -resol_atm 96x95x79 
     87 
     88Example 5: Compile without compressing XIOS and LMDZ/libo in tar files 
     89./compile_lmdzor.sh -notar 
    7790 
    7891end_help 
     
    94107        "-full_orch")       full_orch="-full"  ; shift ;; 
    95108        "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 
     109        "-tar")             tar=yes ; shift ;; 
     110        "-comp_tar")        comp_tar=yes ; shift ;; 
     111        "-notar")           comp_tar=no ; shift ;; 
    96112        *)                  echo "unknown option "$1" , exiting..." ; exit  
    97113    esac 
     
    103119echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile  
    104120echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch" >> $outfile  
     121echo "   tar=$tar, comp_tar=$comp_tar" >> $outfile 
    105122echo >> $outfile 
    106123 
     
    112129    opt_cosp="" 
    113130fi 
     131 
     132 
     133# Compress XIOS and LMDZ/libo without compiling if tar=yes 
     134if [ $tar == yes ] ; then 
     135    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." 
     136    echo >> $outfile 
     137    echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." >> $outfile 
     138    if [[ -d $modipsl/modeles/XIOS ]] ; then 
     139        echo " Now tar XIOS repository" 
     140        echo " Now tar XIOS repository" >> $outfile 
     141        tar -cf $modipsl/modeles/XIOS.tar $modipsl/modeles/XIOS 
     142        rm -rf $modipsl/modeles/XIOS 
     143    else 
     144        echo " No XIOS repository to compress" 
     145        echo " No XIOS repository to compress" >> $outfile 
     146    fi 
     147 
     148    if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     149        echo "Now tar LMDZ/libo repository" 
     150        echo "Now tar LMDZ/libo repository" >> $outfile 
     151        tar -cf $modipsl/modeles/LMDZ/libo.tar $modipsl/modeles/LMDZ/libo 
     152        rm -rf $modipsl/modeles/LMDZ/libo 
     153    else 
     154        echo " No LMDZ/libo repository to compress" 
     155        echo " No LMDZ/libo repository to compress" >> $outfile 
     156    fi 
     157         
     158    echo "END OF SCRIPT" 
     159    echo "END OF SCRIPT" >> $outfile 
     160    exit 
     161fi 
     162 
    114163### Read host dependent default values 
    115164### These variables will not be changed if they were set as argument 
     
    181230fi 
    182231 
     232 
    183233#### 2 Do the compilation  
    184234## 2.1 Compile ioipsl 
     
    203253 
    204254## 2.2 Compile xios 
     255 
     256echo; echo "NOW DECOMPRESS XIOS IF NEEDED" 
     257# First check if XIOS needs to be decompressed 
     258# In priority search for modeles/XIOS_${optmode}.tar but if it doesn't exist take 
     259# the first which is found.  
     260if [[ -d $modipsl/modeles/XIOS ]] ; then 
     261    echo "Found XIOS -> no decompress needs to be do";  >> $outfile 
     262elif [[ -f $modipsl/modeles/XIOS_${optmode}.tar ]]; then 
     263    echo >> $outfile 
     264    echo "Found XIOS_${optmode}.tar -> decompress repository" >> $outfile 
     265    # Do not write "tar -xf ... -C $modipsl/modeles because it's modeles/XIOS that is compressed, not only XIOS/ 
     266    tar -xf $modipsl/modeles/XIOS_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     267elif [[ -f $modipsl/modeles/XIOS_prod.tar ]]; then 
     268    echo >> $outfile 
     269    echo "Found XIOS_prod.tar -> decompress repository" >> $outfile 
     270    tar -xf $modipsl/modeles/XIOS_prod.tar -C $modipsl/ >> $outfile 2>&1 
     271elif [[ -f $modipsl/modeles/XIOS_debug.tar ]]; then 
     272    echo >> $outfile 
     273    echo "Found XIOS_debug.tar -> decompress repository" >> $outfile 
     274    tar -xf $modipsl/modeles/XIOS_debug.tar -C $modipsl/ >> $outfile 2>&1 
     275elif [[ -f $modipsl/modeles/XIOS_dev.tar ]]; then 
     276    echo >> $outfile 
     277    echo "Found XIOS_dev.tar -> decompress repository" >> $outfile 
     278    tar -xf $modipsl/modeles/XIOS_dev.tar -C $modipsl/ >> $outfile 2>&1 
     279elif [[ -f $modipsl/modeles/XIOS.tar ]]; then 
     280    echo >> $outfile 
     281    echo "Found XIOS.tar -> decompress repository" >> $outfile 
     282    tar -xf $modipsl/modeles/XIOS.tar -C $modipsl/ >> $outfile 2>&1 
     283else 
     284    echo "XIOS source code was not found. Exit" 
     285    echo "XIOS source code was not found. Exit" >> $outfile 
     286    exit 
     287fi 
     288 
     289 
    205290cd $modipsl/modeles/XIOS 
    206291echo; echo "NOW COMPILE XIOS" 
     
    255340## 2.4 Compile LMDZ for regular latlon configuration 
    256341cd $modipsl/modeles/LMDZ 
     342 
     343# First check if LMDZ/libo exist or if it could be decompressed 
     344# If neither LMDZ/libo or LMDZ/libo_${optmode}.tar exists, nothing is done. It'll be created 
     345# during the compilation. 
     346echo; echo "NOW DECOMPRESS LMDZ/libo IF NEEDED" 
     347if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 
     348    echo "Found LMDZ/libo -> no decompress needs to be done"; >> $outfile 
     349elif [[ -f $modipsl/modeles/LMDZ/libo_${optmode}.tar ]]; then 
     350    echo "Found LMDZ/libo_${optmode}.tar -> decompress repository"; >> $outfile 
     351    echo >> $outfile 
     352    tar -xf $modipsl/modeles/LMDZ/libo_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 
     353fi 
     354 
     355 
    257356# Compile LMDZ regular lat-lon executable 
    258357echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 
     
    352451fi 
    353452 
     453# Compress XIOS and LMDZ/libo 
     454if [ $comp_tar == yes ] && [ -d $modipsl/modeles/XIOS ] ; then 
     455    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" 
     456    echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" >> $outfile  
     457    tar -cf $modipsl/modeles/XIOS_${optmode}.tar $modipsl/modeles/XIOS 
     458    rm -rf $modipsl/modeles/XIOS 
     459    tar -cf $modipsl/modeles/LMDZ/libo_${optmode}.tar $modipsl/modeles/LMDZ/libo 
     460    rm -rf $modipsl/modeles/LMDZ/libo 
     461fi 
    354462 
    355463echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 
Note: See TracChangeset for help on using the changeset viewer.