[4268] | 1 | #!/bin/bash |
---|
| 2 | #set -vx |
---|
| 3 | # Default options |
---|
| 4 | # |
---|
| 5 | # |
---|
| 6 | # |
---|
[4409] | 7 | date |
---|
[4268] | 8 | #### 1 Set up the compiling options |
---|
| 9 | #### Define some directories |
---|
| 10 | submitdir=$( pwd ) |
---|
| 11 | modipsl=$submitdir/../.. |
---|
[4275] | 12 | arch_path=$submitdir/ARCH |
---|
[4611] | 13 | mysrc_path=$submitdir/SOURCES |
---|
[4268] | 14 | |
---|
[4278] | 15 | #### Set default options |
---|
[4471] | 16 | # Atmospheric resolution, for LMDZ/ORCHIDEE in regular mode |
---|
| 17 | resol_atm=144x142x79 |
---|
| 18 | # Oceanic resolution, for NEMO (ORCA2/ORCA1/ORCA025) |
---|
| 19 | resol_oce=ORCA1 |
---|
| 20 | # Version of ice model lim2/lim3 |
---|
[4611] | 21 | icemodel=lim3 |
---|
| 22 | # Coupled with ocean biogeochemistry (y/n) |
---|
| 23 | oceanbio=y |
---|
[4471] | 24 | # Version ESM CO2: CO2 interactif ocean/atmosphere (y/n) |
---|
| 25 | esmco2=n |
---|
[4641] | 26 | # Also compile ce0l subprogram to LMDZ (y/n) |
---|
| 27 | ce0l=n |
---|
[4471] | 28 | |
---|
[4268] | 29 | # Optimization mode |
---|
| 30 | # optmode=prod/dev/debug |
---|
| 31 | optmode=prod |
---|
| 32 | # fcm_arch |
---|
| 33 | fcm_arch=default |
---|
| 34 | # Default values to be overritten |
---|
[4339] | 35 | parallel=mpi_omp |
---|
[4268] | 36 | export fcm_arch parallel xios |
---|
| 37 | full_flag="" |
---|
[4611] | 38 | full_nemo=n |
---|
[4641] | 39 | full_xios="" |
---|
| 40 | full_lmdz="" |
---|
| 41 | full_orch="" |
---|
[4268] | 42 | |
---|
[4641] | 43 | |
---|
| 44 | |
---|
[4408] | 45 | # Output text file for compilation of each component |
---|
[4622] | 46 | datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` |
---|
| 47 | outfile=$submitdir/out_compile_ipslcm6.$datestr |
---|
| 48 | echo > $outfile |
---|
[4641] | 49 | echo; echo "Text output from compilation will be stored in file out_compile_ipslcm6.$datestr"; echo |
---|
[4408] | 50 | |
---|
[4278] | 51 | #### Read arguments |
---|
[4268] | 52 | # Loop over all arguments to modify default set up |
---|
| 53 | while (($# > 0)) ; do |
---|
[4278] | 54 | case $1 in |
---|
[4641] | 55 | "-h") cat <<end_help |
---|
[4268] | 56 | ######################################################################## |
---|
[4471] | 57 | # Usage of the script compile_ipslcm6.sh |
---|
[4268] | 58 | # |
---|
| 59 | ######################################################################## |
---|
| 60 | |
---|
[4471] | 61 | ./compile_ipslcm6.sh [Options] |
---|
[4268] | 62 | |
---|
| 63 | |
---|
[4611] | 64 | Options: [LR / VLR / MR1 / MR025] Model resolution, choose only one. Default: LR. |
---|
[4471] | 65 | [ESMCO2] Compile IPSLCM6 for CO2 interactif ocean/atmosphere. |
---|
| 66 | [-full] Full recompilation of all components. This option can be added to all other options. |
---|
[4611] | 67 | [-cleannemo] Full recompilation of NEMO component only. |
---|
[4471] | 68 | [-debug / -dev / -prod] Level of optimization. One of these can be added to all other compile options. Default: -prod. |
---|
[4268] | 69 | |
---|
[4407] | 70 | |
---|
[4471] | 71 | Example 1: Default compilation of IPSLCM6 for resoltion LR |
---|
| 72 | (Resolution atmos: 144x142x79, ocean: ORCA1) |
---|
| 73 | ./compile_ipslcm6.sh |
---|
[4268] | 74 | |
---|
[4471] | 75 | Example 2: Compilation of IPSLCM6 for resolution MR025 |
---|
| 76 | (atmos: 256x256x79, ocean: ORCA025, NOPISCES) |
---|
| 77 | ./compile_ipslcm6.sh MR025 |
---|
[4268] | 78 | |
---|
[4471] | 79 | Example 3: Compilation of IPSLCM6 for ESM CO2 |
---|
[4611] | 80 | ./compile_ipslcm6.sh ESMCO2 -cleannemo |
---|
[4471] | 81 | |
---|
| 82 | Example 4: Default resoltuion (LR) compiled in debug mode |
---|
| 83 | ./compile_ipslcm6.sh -debug |
---|
| 84 | |
---|
| 85 | Example 5: Default compilation with full recompilation of all components. No clean is needed. |
---|
| 86 | ./compile_ipslcm6.sh -full |
---|
| 87 | |
---|
| 88 | Example 6: Full recompilation of resolution MR05 in debug mode |
---|
| 89 | ./compile_ipslcm6.sh MR025 -debug -full |
---|
| 90 | |
---|
[4641] | 91 | end_help |
---|
| 92 | exit;; |
---|
| 93 | "VLR") resol_atm=96x95x39; resol_oce=ORCA2 ; icemodel=lim2; oceanbio=y; shift ;; |
---|
| 94 | "LR") resol_atm=144x142x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;; |
---|
| 95 | "MR1") resol_atm=256x256x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;; |
---|
| 96 | "MR025") resol_atm=256x256x79; resol_oce=ORCA025 ; icemodel=lim3; oceanbio=n; shift ;; |
---|
| 97 | "ESMCO2") esmco2=y; shift ;; |
---|
| 98 | "CE0L") ce0l=y ; shift ;; |
---|
| 99 | "-parallel") parallel=$2 ; shift ; shift ;; |
---|
| 100 | "-arch") fcm_arch="$2" ; shift ; shift ;; |
---|
| 101 | "-debug") optmode=debug ; shift ;; |
---|
| 102 | "-dev") optmode=dev ; shift ;; |
---|
| 103 | "-prod") optmode=prod ; shift ;; |
---|
| 104 | "-full") full_flag="-full"; full_nemo=y ; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;; |
---|
| 105 | "-full_xios") full_xios="--full" ; shift ;; # Note only full_xios is using double dash: --full |
---|
| 106 | "-full_lmdz") full_lmdz="-full" ; shift ;; |
---|
| 107 | "-full_orch") full_orch="-full" ; shift ;; |
---|
| 108 | "-full_nemo") full_nemo=y ; shift ;; |
---|
| 109 | "-cleannemo") full_nemo=y ; shift ;; |
---|
| 110 | *) echo "unknown option "$2" , exiting..." ; exit |
---|
[4278] | 111 | esac |
---|
| 112 | done |
---|
[4268] | 113 | |
---|
[4641] | 114 | echo "Following options are set in current compiling:" >> $outfile |
---|
| 115 | echo " resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, oceanbio=${oceanbio}" >> $outfile |
---|
[4471] | 116 | echo " esmco2=${esmco2}" >> $outfile |
---|
[4641] | 117 | echo " ce0l=${ce0l}" >> $outfile |
---|
| 118 | echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile |
---|
| 119 | echo " full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_nemo=$full_nemo," >> $outfile |
---|
[4408] | 120 | echo >> $outfile |
---|
[4268] | 121 | |
---|
[4278] | 122 | ### Read host dependent default values |
---|
| 123 | ### These variables will not be changed if they were set as argument |
---|
[4268] | 124 | ###./host.sh $host |
---|
| 125 | # Later : Following lines should be set in host.sh file |
---|
| 126 | # begin host.sh |
---|
| 127 | if [ $fcm_arch == default ] ; then |
---|
[4278] | 128 | # Find out current host and source specific paths and commands for the host |
---|
| 129 | case $( hostname -s ) in |
---|
| 130 | ada*) |
---|
| 131 | fcm_arch=X64_ADA;; |
---|
| 132 | irene*) |
---|
[4391] | 133 | fcm_arch=X64_IRENE;; |
---|
[4278] | 134 | asterix*|obelix*) |
---|
| 135 | fcm_arch=ifort_LSCE;; |
---|
[4391] | 136 | ciclad*|climserv*) |
---|
| 137 | fcm_arch=ifort_CICLAD;; |
---|
[4278] | 138 | *) |
---|
[4391] | 139 | echo Current host is not known. You must use option -arch to specify which architecuture files to use. |
---|
[4278] | 140 | echo Exit now. |
---|
| 141 | exit |
---|
| 142 | esac |
---|
[4268] | 143 | fi |
---|
| 144 | |
---|
[4452] | 145 | # Set a link to arch.env if arch-${fcm_arch}.env file exist for current fcm_arch. |
---|
[4391] | 146 | # The link arch.env is also set in config.card and will be used by libIGCM to ensure the same running environnement. |
---|
| 147 | if [ -f ARCH/arch-${fcm_arch}.env ] ; then |
---|
[4408] | 148 | echo >> $outfile |
---|
[4470] | 149 | echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation for all components" |
---|
| 150 | echo "Note that this new environement might be kept after compilation." |
---|
| 151 | echo "If this is the case, source again your personal environment after compilation. " |
---|
| 152 | echo " Personal module list before sourcing of ARCH/arch.env file:" >> $outfile |
---|
| 153 | module list >> $outfile 2>&1 |
---|
| 154 | |
---|
| 155 | # Make a link to this file, to be used also in config.card |
---|
[4391] | 156 | rm -f ARCH/arch.env |
---|
| 157 | ln -s arch-${fcm_arch}.env ARCH/arch.env |
---|
[4470] | 158 | |
---|
| 159 | # Source the file |
---|
| 160 | source ARCH/arch.env >> $outfile 2>&1 |
---|
| 161 | echo >> $outfile |
---|
| 162 | echo " New module list after sourcing of ARCH/arch.env file:" >> $outfile |
---|
| 163 | module list >> $outfile 2>&1 |
---|
[4391] | 164 | fi |
---|
| 165 | |
---|
[4268] | 166 | #### 2 Do the compilation |
---|
| 167 | ## 2.1 Compile ioipsl |
---|
| 168 | cd $modipsl/modeles/IOIPSL |
---|
[4278] | 169 | echo; echo "NOW COMPILE IOIPSL" |
---|
[4408] | 170 | echo >> $outfile ; echo " NOW COMPILE IOIPSL" >> $outfile |
---|
| 171 | |
---|
[4411] | 172 | # Check if compilation with fcm is included in IOIPSL |
---|
| 173 | if [ ! -f makeioipsl_fcm ] ; then |
---|
| 174 | echo "The file makeiopsl_fcm do not exist. Probably this is not the right version of IOIPSL." |
---|
| 175 | echo "Version of IOIPSL with fcm compilation is needed to compile with this script. Stop now." |
---|
| 176 | exit |
---|
| 177 | fi |
---|
| 178 | |
---|
[4408] | 179 | echo ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag >> $outfile |
---|
| 180 | ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag >> $outfile 2>&1 |
---|
[4268] | 181 | # Test if compiling succeded |
---|
| 182 | if [[ $? != 0 ]] ; then |
---|
[4278] | 183 | echo "THERE IS A PROBLEM IN IOIPSL COMPILATION - STOP" |
---|
| 184 | exit |
---|
[4268] | 185 | fi |
---|
| 186 | |
---|
[4611] | 187 | ## 2.2 Compile oasis3-mct |
---|
[4627] | 188 | cd $modipsl/oasis3-mct/util/make_dir |
---|
[4611] | 189 | echo; echo "NOW COMPILE OASIS3-MCT" |
---|
| 190 | echo >> $outfile ; echo " NOW COMPILE OASIS3-MCT" >> $outfile |
---|
[4627] | 191 | cp $mysrc_path/OASIS3-MCT/make_${fcm_arch} make.inc |
---|
[4611] | 192 | |
---|
[4627] | 193 | echo make -f TopMakefileOasis3 >> $outfile |
---|
| 194 | make -f TopMakefileOasis3 >> $outfile 2>&1 |
---|
| 195 | |
---|
| 196 | |
---|
[4611] | 197 | ## 2.3 Compile xios |
---|
[4268] | 198 | cd $modipsl/modeles/XIOS |
---|
[4278] | 199 | echo; echo "NOW COMPILE XIOS" |
---|
[4408] | 200 | echo >> $outfile ; echo " NOW COMPILE XIOS" >> $outfile |
---|
[4641] | 201 | echo ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path --job 4 $full_xios >> $outfile |
---|
| 202 | ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path --job 4 $full_xios >> $outfile 2>&1 |
---|
[4268] | 203 | # Test if compiling succeded |
---|
| 204 | if [[ $? != 0 ]] ; then |
---|
[4278] | 205 | echo "THERE IS A PROBLEM IN XIOS COMPILATION - STOP" |
---|
| 206 | exit |
---|
[4268] | 207 | fi |
---|
[4391] | 208 | # Move executables to modipsl/bin |
---|
[4457] | 209 | if [ -f $modipsl/modeles/XIOS/bin/xios_server.exe ] ; then |
---|
| 210 | mv $modipsl/modeles/XIOS/bin/xios_server.exe $modipsl/bin/xios_server_${optmode}.exe |
---|
[4391] | 211 | else |
---|
| 212 | echo "THERE IS A PROBLEM IN XIOS COMPILATION EXECUTABLE MISSING - STOP" |
---|
| 213 | exit |
---|
| 214 | fi |
---|
[4268] | 215 | |
---|
[4391] | 216 | |
---|
[4611] | 217 | ## 2.4 Compile orchidee |
---|
[4268] | 218 | cd $modipsl/modeles/ORCHIDEE |
---|
[4278] | 219 | echo; echo "NOW COMPILE ORCHIDEE" |
---|
[4408] | 220 | echo >> $outfile ; echo " NOW COMPILE ORCHIDEE" >> $outfile |
---|
| 221 | |
---|
[4641] | 222 | echo ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch >> $outfile |
---|
| 223 | ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch >> $outfile 2>&1 |
---|
[4268] | 224 | # Test if compiling finished |
---|
| 225 | if [[ $? != 0 ]] ; then |
---|
| 226 | echo "THERE IS A PROBLEM IN ORCHIDEE COMPILATION - STOP" |
---|
| 227 | exit |
---|
| 228 | fi |
---|
| 229 | |
---|
[4408] | 230 | |
---|
[4611] | 231 | ## 2.5 Compile NEMO |
---|
| 232 | nemo_root=$modipsl/modeles/NEMOGCM/CONFIG |
---|
| 233 | if [ ${icemodel} == lim2 ] ; then |
---|
| 234 | addkeys="key_lim2_vp key_diahth key_oasis3" |
---|
| 235 | delkeys="key_nosignedzero key_mpp_rep" |
---|
| 236 | else |
---|
[4626] | 237 | addkeys="key_top key_pisces key_age key_cfc key_cpl_carbon_cycle key_gas key_oasis3" |
---|
[4611] | 238 | if [ ${oceanbio} == y ] ; then |
---|
| 239 | if [ ${esmco2} == y ] ; then |
---|
| 240 | delkeys="key_nosignedzero key_mpp_rep" |
---|
| 241 | else |
---|
| 242 | delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle key_gas" |
---|
| 243 | fi |
---|
| 244 | else |
---|
| 245 | delkeys="key_nosignedzero key_mpp_rep key_top key_pisces key_cfc key_age key_cpl_carbon_cycle key_gas" |
---|
| 246 | fi |
---|
| 247 | fi |
---|
| 248 | |
---|
| 249 | if [ ${oceanbio} == n ] ; then |
---|
| 250 | echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES" |
---|
| 251 | echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES" >> $outfile |
---|
| 252 | else |
---|
| 253 | echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES" |
---|
| 254 | echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES" >> $outfile |
---|
| 255 | fi |
---|
| 256 | echo >> $outfile ; echo cd $nemo_root >> $outfile |
---|
| 257 | echo >> $outfile ; echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/arch-${fcm_arch}.fcm ../ARCH/. >> $outfile |
---|
| 258 | echo >> $outfile |
---|
| 259 | |
---|
| 260 | cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm ../ARCH/. |
---|
| 261 | |
---|
| 262 | if [ ${resol_oce} == ORCA2 ] ; then cfg_wrk=ORCA2_LIM_PISCES ; fi |
---|
| 263 | if [ ${resol_oce} == ORCA1 ] ; then cfg_wrk=ORCA1_LIM3_PISCES ; fi |
---|
| 264 | if [ ${resol_oce} == ORCA025 ] ; then cfg_wrk=ORCA025_LIM3_PISCES ; fi |
---|
| 265 | |
---|
| 266 | echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/ >> $outfile |
---|
| 267 | echo >> $outfile |
---|
| 268 | cp $mysrc_path/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/ |
---|
| 269 | |
---|
| 270 | if [ $full_nemo == y ] ; then |
---|
[4641] | 271 | # To make a full compilation, first make a clean to remove all files produced during previous compilation |
---|
[4611] | 272 | echo ./makenemo -m ${fcm_arch} -n $cfg_wrk clean >> $outfile |
---|
| 273 | echo >> $outfile |
---|
| 274 | ./makenemo -m ${fcm_arch} -n $cfg_wrk clean >> $outfile 2>&1 |
---|
| 275 | fi |
---|
[4627] | 276 | echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile |
---|
| 277 | echo >> $outfile |
---|
| 278 | ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile 2>&1 |
---|
[4611] | 279 | |
---|
[4627] | 280 | |
---|
[4611] | 281 | # Test if compiling finished |
---|
| 282 | if [[ $? != 0 ]] ; then |
---|
| 283 | echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP" |
---|
| 284 | exit |
---|
| 285 | fi |
---|
| 286 | |
---|
[4627] | 287 | echo >> $outfile |
---|
[4629] | 288 | echo "Move nemo executable to modipsl/bin" >> $outfile |
---|
[4627] | 289 | echo ls -lrt $nemo_root/$cfg_wrk/BLD/bin >> $outfile |
---|
| 290 | ls -lrt $nemo_root/$cfg_wrk/BLD/bin >> $outfile |
---|
| 291 | echo >> $outfile |
---|
| 292 | |
---|
[4629] | 293 | if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${optmode} ; fi |
---|
| 294 | if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] && [ ${esmco2} == y ] ; then mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.esm_${optmode} ; fi |
---|
[4611] | 295 | |
---|
| 296 | |
---|
| 297 | ## 2.6 Compile LMDZ for regular latlon configuration |
---|
[4469] | 298 | cd $modipsl/modeles/LMDZ |
---|
| 299 | # Compile LMDZ regular lat-lon exectuable |
---|
| 300 | echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" |
---|
| 301 | echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" >> $outfile |
---|
[4268] | 302 | |
---|
[4622] | 303 | # Check if the compilation of LMDZ was previsouly interupted prematured. |
---|
| 304 | # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm |
---|
| 305 | # to ask question and wait for interactivly answer from the user. |
---|
| 306 | if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then |
---|
| 307 | echo >> $outfile |
---|
| 308 | echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. " >> $outfile |
---|
| 309 | echo " This means that the compilation is either currently on going in another terminal was previous interupted before the end." >> $outfile |
---|
| 310 | echo " The files dimension.h and .lock will now be removed. " >> $outfile |
---|
| 311 | echo >> $outfile |
---|
| 312 | rm -f libf/grid/dimensions.h |
---|
| 313 | rm -f .lock |
---|
| 314 | fi |
---|
| 315 | |
---|
[4641] | 316 | echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile |
---|
| 317 | ./makelmdz_fcm -d ${resol_atm} -c OMCT -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 |
---|
[4469] | 318 | # Test if compiling finished |
---|
| 319 | if [[ $? != 0 ]] ; then |
---|
| 320 | echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" |
---|
| 321 | exit |
---|
| 322 | fi |
---|
[4408] | 323 | |
---|
[4469] | 324 | # Move executables to modipsl/bin folder |
---|
[4627] | 325 | echo >> $outfile |
---|
[4641] | 326 | echo "Move gcm.e executable to modipsl/bin" >> $outfile |
---|
[4627] | 327 | echo ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile |
---|
| 328 | ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile |
---|
| 329 | echo >> $outfile |
---|
[4641] | 330 | suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e |
---|
| 331 | echo gcm.e suffix = $suffix |
---|
[4627] | 332 | |
---|
[4641] | 333 | if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then |
---|
| 334 | mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e |
---|
| 335 | else |
---|
| 336 | echo "ERROR gcm${suffix} executable does not exist." |
---|
| 337 | echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" |
---|
| 338 | exit |
---|
| 339 | fi |
---|
[4278] | 340 | |
---|
[4268] | 341 | |
---|
[4641] | 342 | # Compile ce0l initialization program for LMDZ regular lat-lon exectuable |
---|
| 343 | if [ $ce0l == y ] ; then |
---|
| 344 | echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" |
---|
| 345 | echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" >> $outfile |
---|
| 346 | |
---|
| 347 | echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile |
---|
| 348 | ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1 |
---|
| 349 | # Test if compiling finished |
---|
| 350 | if [[ $? != 0 ]] ; then |
---|
| 351 | echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" |
---|
| 352 | exit |
---|
| 353 | fi |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | # Move executables to modipsl/bin folder |
---|
| 357 | echo >> $outfile |
---|
| 358 | echo "Move ce0l.e executable to modipsl/bin" >> $outfile |
---|
| 359 | echo ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile |
---|
| 360 | ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile |
---|
| 361 | echo >> $outfile |
---|
| 362 | suffix=_${resol_atm}_phylmd_para_mem_orch.e |
---|
| 363 | echo ce0l suffix = $suffix |
---|
| 364 | |
---|
| 365 | if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ; then |
---|
| 366 | mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e |
---|
| 367 | else |
---|
| 368 | echo "ERROR ce0l${suffix} executable does not exist." |
---|
| 369 | echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" |
---|
| 370 | exit |
---|
| 371 | fi |
---|
| 372 | fi |
---|
| 373 | |
---|
[4408] | 374 | echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile |
---|
[4628] | 375 | echo ls -lrt modipsl/bin >> $outfile |
---|
| 376 | ls -lrt $modipsl/bin >> $outfile |
---|
[4278] | 377 | |
---|
[4628] | 378 | echo; echo "ALL COMPILING FINISHED" ; echo |
---|
| 379 | echo "Executables are found in modipsl/bin" |
---|
| 380 | echo "Check that executable names correspond with the name set in config.card before launching the job" |
---|
[4629] | 381 | echo ls -lrt modipsl/bin |
---|
| 382 | ls -lrt $modipsl/bin |
---|
[4628] | 383 | |
---|
[4409] | 384 | date |
---|
[4627] | 385 | |
---|
[4268] | 386 | exit |
---|
| 387 | |
---|
| 388 | |
---|