Changeset 6080
- Timestamp:
- 03/02/22 14:54:34 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v7/ICOLMDZOR_v7/compile_icolmdzor.sh
r5883 r6080 19 19 # Resolution if compiling LMDZ in regular mode without DYNAMICO 20 20 # Use for example following "./compile_icolmdzor.sh -regular_latlon 144x142x79" 21 regular_latlon=no 21 resol_atm=144x142x79 22 #choose if we want to compile only grid ico, grid reg. If no for both of them, we will compile the two grids 23 ico_only=no 24 reg_only=no 25 #choose if we want to compile only create_etat0_limit 26 ce0l_only=no 22 27 # fcm_arch 23 28 fcm_arch=default … … 55 60 Options: -full, -regular_latlon, -debug, -dev, -prod(default) 56 61 57 Example 1: Default compilation of DYNAMICO-LMDZ-ORCHIDEE with XIOS and IOIPSL62 Example 1: Default compilation of [DYNAMICO-LMDZ-ORCHIDEE with XIOS and IOIPSL] and [LMDZ-ORCHIDEE with XIOS and IOIPSL] and [create_etat0_limit] 58 63 ./compile_icolmdzor.sh 59 64 … … 64 69 ./compile_icolmdzor.sh -full 65 70 66 Example 4: Compilation of LMDZ in regular lat-lon for dimension 144x142x79. 67 The dimension can be changed to any other 3d dimension. DYNAMICO is also compiled as default. 68 ./compile_icolmdzor.sh -regular_latlon 144x142x79 71 Example 4: Define dimension for regular grid (default one is 144x142x79) 72 The dimension can be changed to any other 3d dimension - in this example DYNAMICO is also compiled as default. 73 ./compile_icolmdzor.sh -regular_latlon 256x256x79 74 75 Example 5: Compile only ico grid 76 ./compile_icolmdzo.sh -ico_only 77 78 Example 6: Compile only regular grid with default resolution (144x142x79) 79 ./compile_icolmdzor.sh -reg_only 80 81 Example 7: compile only create_etat0_limt for reg and ico 82 ./compile_icolmdzor.sh -ce0l_only 69 83 70 84 end_help … … 83 97 "-full_orch") full_orch="-full" ; shift ;; 84 98 "-full_dyna") full_dyna="-full" ; shift ;; 99 "-ico_only") ico_only=yes ; shift ;; 100 "-reg_only") reg_only=yes ; shift ;; 101 "-ce0l_only") ce0l_only=yes ; shift ;; 85 102 "-netcdf_lib_seq") netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 86 103 *) echo "unknown option "$1" , exiting..." ; exit … … 89 106 90 107 echo "Following options are set in current compiling:" >> $outfile 91 echo " regular_latlon=$regular_latlon (if yes, then resol_atm=${resol_atm})" >> $outfile 108 echo " ico_only=${ico_only}, reg_only=${reg_only}, ce0l_only=${ce0l_only}" >> $outfile 109 echo " regular_latlon=${resol_atm} (use to create executable on regular grid)" >> $outfile 92 110 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 93 111 echo " full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_dyna=$full_dyna" >> $outfile … … 214 232 215 233 ## 2.4 Compile lmdz 216 cd $modipsl/modeles/LMDZ 217 # Compile LMDZ as library to couple to DYNAMICO 218 echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" 219 echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" >> $outfile 220 221 # Check if the compilation of LMDZ was previsouly interupted prematured. 222 # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 223 # to ask question and wait for interactivly answer from the user. 224 if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 225 echo >> $outfile 226 echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. " >> $outfile 227 echo " This means that the compilation is either currently on going in another terminal was previous interupted before the end." >> $outfile 228 echo " The files dimension.h and .lock will now be removed. " >> $outfile 229 echo >> $outfile 230 rm -f libf/grid/dimensions.h 231 rm -f .lock 232 fi 233 234 echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz >> $outfile 235 ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz >> $outfile 2>&1 236 # Test if compiling finished 237 if [[ $? != 0 ]] ; then 238 echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP" 239 exit 240 fi 241 242 243 ## 2.5 Compile DYNAMICO 244 cd $modipsl/modeles/DYNAMICO 245 echo; echo "NOW COMPILE DYNAMICO " 246 echo >> $outfile ; echo " NOW COMPILE DYNAMICO" >> $outfile 247 248 if [ -d $modipsl/config/ICOLMDZOR_v7/SOURCES/DYNAMICO ] ; then 249 cd $modipsl/config/ICOLMDZOR_v7/SOURCES/DYNAMICO 250 for dir in $( find . -mindepth 1 -maxdepth 1 -type d ); do 251 for file in $( find $dir -type f ! -path '*.svn*' ); do 252 echo cp $file $modipsl/modeles/DYNAMICO/$file >> $outfile 253 cp $file $modipsl/modeles/DYNAMICO/$file >> $outfile 2>&1 254 done 255 done 256 cd $modipsl/modeles/DYNAMICO 257 fi 258 259 echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 260 ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 2>&1 261 # Test if compiling finished 262 if [[ $? != 0 ]] ; then 263 echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP" 264 exit 265 fi 266 267 ## 2.6 Compile interface ICOSA_LMDZ 268 cd $modipsl/modeles/ICOSA_LMDZ 269 echo; echo "NOW COMPILE ICOSA_LMDZ " 270 echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ" >> $outfile 271 272 if [ -d $modipsl/config/ICOLMDZOR_v7/SOURCES/ICOSA_LMDZ ] ; then 273 cd $modipsl/config/ICOLMDZOR_v7/SOURCES/ICOSA_LMDZ 274 for dir in $( find . -mindepth 1 -maxdepth 1 -type d ); do 275 for file in $( find $dir -type f ! -path '*.svn*' ); do 276 echo cp $file $modipsl/modeles/ICOSA_LMDZ/$file >> $outfile 277 cp $file $modipsl/modeles/ICOSA_LMDZ/$file >> $outfile 2>&1 278 done 279 done 280 cd $modipsl/modeles/ICOSA_LMDZ 281 fi 282 283 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 284 ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 2>&1 285 # Test if compiling finished 286 if [[ $? != 0 ]] ; then 287 echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP" 288 exit 289 fi 290 # Move executables to modipsl/bin 291 if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 292 mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}.exe 293 else 294 echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP" 295 exit 296 fi 297 298 299 300 ## 2.7 Compile LMDZ for regular latlon configuration 301 if [ $regular_latlon = yes ] ; then 234 235 if [ $reg_only = no ] && [ $ce0l_only = no ]; then 302 236 303 237 cd $modipsl/modeles/LMDZ 304 # Compile LMDZ regular lat-lon exectuable 305 echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 306 echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" >> $outfile 238 239 # Compile LMDZ as library to couple to DYNAMICO 240 echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" 241 echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" >> $outfile 307 242 308 243 # Check if the compilation of LMDZ was previsouly interupted prematured. … … 318 253 rm -f .lock 319 254 fi 255 256 echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz >> $outfile 257 ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz >> $outfile 2>&1 258 # Test if compiling finished 259 if [[ $? != 0 ]] ; then 260 echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP" 261 exit 262 fi 263 264 265 ## 2.5 Compile DYNAMICO 266 cd $modipsl/modeles/DYNAMICO 267 echo; echo "NOW COMPILE DYNAMICO " 268 echo >> $outfile ; echo " NOW COMPILE DYNAMICO" >> $outfile 269 270 if [ -d $modipsl/config/ICOLMDZOR_v7/SOURCES/DYNAMICO ] ; then 271 cd $modipsl/config/ICOLMDZOR_v7/SOURCES/DYNAMICO 272 for dir in $( find . -mindepth 1 -maxdepth 1 -type d ); do 273 for file in $( find $dir -type f ! -path '*.svn*' ); do 274 echo cp $file $modipsl/modeles/DYNAMICO/$file >> $outfile 275 cp $file $modipsl/modeles/DYNAMICO/$file >> $outfile 2>&1 276 done 277 done 278 cd $modipsl/modeles/DYNAMICO 279 fi 280 281 echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 282 ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 2>&1 283 # Test if compiling finished 284 if [[ $? != 0 ]] ; then 285 echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP" 286 exit 287 fi 288 289 ## 2.6 Compile interface ICOSA_LMDZ 290 cd $modipsl/modeles/ICOSA_LMDZ 291 echo; echo "NOW COMPILE ICOSA_LMDZ " 292 echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ" >> $outfile 293 294 if [ -d $modipsl/config/ICOLMDZOR_v7/SOURCES/ICOSA_LMDZ ] ; then 295 cd $modipsl/config/ICOLMDZOR_v7/SOURCES/ICOSA_LMDZ 296 for dir in $( find . -mindepth 1 -maxdepth 1 -type d ); do 297 for file in $( find $dir -type f ! -path '*.svn*' ); do 298 echo cp $file $modipsl/modeles/ICOSA_LMDZ/$file >> $outfile 299 cp $file $modipsl/modeles/ICOSA_LMDZ/$file >> $outfile 2>&1 300 done 301 done 302 cd $modipsl/modeles/ICOSA_LMDZ 303 fi 304 305 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 306 ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 2>&1 307 # Test if compiling finished 308 if [[ $? != 0 ]] ; then 309 echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP" 310 exit 311 fi 312 # Move executables to modipsl/bin 313 if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 314 mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}.exe 315 else 316 echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP" 317 exit 318 fi 319 320 fi 321 322 ## 2.7 Compile LMDZ for regular latlon configuration 323 324 # Find executable suffix 325 if [ $parallel == seq ] || [ $parallel == none ] ; then 326 suffix=_${resol_atm}_phylmd_seq_orch.e 327 else 328 suffix=_${resol_atm}_phylmd_para_mem_orch.e 329 fi 330 echo gcm suffix = $suffix 331 332 333 if [ $ico_only = no ] && [ $ce0l_only = no ]; then 334 335 cd $modipsl/modeles/LMDZ 336 # Compile LMDZ regular lat-lon exectuable 337 echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" 338 echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}" >> $outfile 339 340 # Check if the compilation of LMDZ was previsouly interupted prematured. 341 # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 342 # to ask question and wait for interactivly answer from the user. 343 if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 344 echo >> $outfile 345 echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. " >> $outfile 346 echo " This means that the compilation is either currently on going in another terminal was previous interupted before the end." >> $outfile 347 echo " The files dimension.h and .lock will now be removed. " >> $outfile 348 echo >> $outfile 349 rm -f libf/grid/dimensions.h 350 rm -f .lock 351 fi 320 352 echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm >> $outfile 321 353 ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm >> $outfile 2>&1 … … 326 358 fi 327 359 360 361 # Move executables to modipsl/bin folder 362 echo "Move gcm.e executable to modipsl/bin" 363 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then 364 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e 365 else 366 echo "ERROR gcm${suffix} executable does not exist." 367 echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 368 exit 369 fi 370 371 fi 372 373 374 if [ $ce0l_only = yes ] || [ $ico_only = no ] && [ $reg_only = no ] ; then 375 376 cd $modipsl/modeles/LMDZ 377 328 378 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 329 379 echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" … … 338 388 fi 339 389 340 # Find executable suffix341 if [ $parallel == seq ] || [ $parallel == none ] ; then342 suffix=_${resol_atm}_phylmd_seq_orch.e343 else344 suffix=_${resol_atm}_phylmd_para_mem_orch.e345 fi346 echo gcm suffix = $suffix347 348 390 # Move executables to modipsl/bin folder 349 echo "Move gcm.e and ce0l executable to modipsl/bin" 350 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then 351 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e 352 else 353 echo "ERROR gcm${suffix} executable does not exist." 354 echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 355 exit 356 fi 357 391 echo "Move ce0l.e executable to modipsl/bin" 358 392 if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ; then 359 393 mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e … … 363 397 exit 364 398 fi 365 fi 399 400 fi 401 366 402 367 403
Note: See TracChangeset
for help on using the changeset viewer.