Changeset 6664 for CONFIG/UNIFORM/v6/IPSLCM6.3/compile_ipslcm6.sh
- Timestamp:
- 10/24/23 15:49:20 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLCM6.3/compile_ipslcm6.sh
r6629 r6664 22 22 # Coupled with ocean biogeochemistry (y/n) 23 23 oceanbio=y 24 # Version ESM CO2: CO2 interactif ocean/atmosphere (y/n) 25 esmco2=n 26 # Version ESM AER : Aer interactif chemistry / atmosphere (y/n) 27 esmchem=n 24 # Version ESM-CYCLE : coupling between INCA and PISCES (y/n) 25 esmcycle=n 28 26 # Also compile ce0l subprogram to LMDZ (y/n) 29 27 ce0l=n … … 64 62 ######################################################################## 65 63 # Usage of the script compile_ipslcm6.sh 66 #67 64 ######################################################################## 68 65 … … 71 68 72 69 Options: [LR / VLR / MR1 / MR025] Model resolution, choose only one. Default: LR. 73 [ESMCO2] Compile IPSLCM6 for CO2 interactif ocean/atmosphere. 74 [ESMCHEM] Compile IPSLCM6 for chemistry interactif on atmosphere 75 [ESMCYCLE] Compile IPSLCM6 for both interactive CO2 and chemistry, and transfer from PISCES to LMDZ and INCA. 70 [ESMCYCLE] Compile IPSLCM6 for interactive chemistry, and transfer from PISCES to LMDZ and INCA. 76 71 [-full] Full recompilation of all components. This option can be added to all other options. 77 72 [-cleannemo] Full recompilation of NEMO component only. … … 79 74 80 75 81 Example 1: Default compilation of IPSLCM6 for resol tion LR82 76 Example 1: Default compilation of IPSLCM6 for resolution LR. 77 (Resolution atmos: 144x142x79, ocean: ORCA1) 83 78 ./compile_ipslcm6.sh 84 79 85 Example 2: Compilation of IPSLCM6 for resolution MR025 80 Example 2: Compilation of IPSLCM6 for resolution MR025. 86 81 (atmos: 256x256x79, ocean: ORCA025, NOPISCES) 87 82 ./compile_ipslcm6.sh MR025 88 83 89 Example 3: Compilation of IPSLCM6 for ESM CO2 90 ./compile_ipslcm6.sh ESMCO2 -cleannemo 91 92 Example 4: Default resoltuion (LR) compiled in debug mode 84 Example 3: Default resolution (LR) compiled in debug mode. 93 85 ./compile_ipslcm6.sh -debug 94 86 95 Example 5: Default compilation with full recompilation of all components. No clean is needed.87 Example 4: Default compilation with full recompilation of all components. No clean is needed. 96 88 ./compile_ipslcm6.sh -full 97 89 98 Example 6: Full recompilation of resolution MR05 in debug mode90 Example 5: Full recompilation of resolution MR025 in debug mode. 99 91 ./compile_ipslcm6.sh MR025 -debug -full 100 92 101 Example 7: choose radiative schema for LMDZ (oldrad/rrtm/ecrad). Default is rrtm93 Example 6: Choose radiative schema for LMDZ (oldrad/rrtm/ecrad). Default is rrtm. 102 94 ./compile_ipslcm6.sh MR025 -rad ecrad 103 95 104 Example 8: Compilation of IPSLCM6 for ESM with coupling between ATM / OCE and INCA chemistry AER96 Example 7: Compilation of IPSLCM6 for ESM with coupling between ATM/OCE and INCA chemistry AER. 105 97 ./compile_ipslcm6.sh ESMCYCLE -chimie AER 106 98 107 Example 9: Compilation of IPSLCM6 for ESM with INCA chemistry and choose the chemistry 108 ./compile_ipslcm6.sh ESMCHEM -chimie GES 109 99 Example 8: Compilation of IPSLCM6 for ESM with INCA chemistry and choose the chemistry, without coupling between INCA and PISCES. 100 ./compile_ipslcm6.sh -chimie GES 110 101 111 102 end_help … … 115 106 "MR1") resol_atm=256x256x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;; 116 107 "MR025") resol_atm=256x256x79; resol_oce=ORCA025 ; icemodel=lim3; oceanbio=n; shift ;; 117 "ESMCO2") esmco2=y; shift ;; 118 "ESMCHEM") esmchem=y; shift ;; 119 "ESMCYCLE") esmco2=y; esmchem=y; shift ;; 108 "ESMCYCLE") esmcycle=y; shift ;; 120 109 "CE0L") ce0l=y ; shift ;; 121 110 "-rad") rad=$2; shift ; shift;; … … 140 129 echo "Following options are set in current compiling:" >> $outfile 141 130 echo " resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, oceanbio=${oceanbio}" >> $outfile 142 echo " esmc o2=${esmco2}, esmchem=${esmchem}, chemistry=${optchimie}" >> $outfile131 echo " esmcycle=${esmcycle}, chemistry=${optchimie}" >> $outfile 143 132 echo " ce0l=${ce0l}" >> $outfile 144 133 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile … … 297 286 addkeys="key_top key_pisces key_age key_cfc key_cpl_carbon_cycle key_gas key_oasis3" 298 287 if [ ${oceanbio} == y ] ; then 299 if [ ${esmco2} == y ] ; then 300 if [ ${esmchem} == y ] ; then 301 delkeys="key_nosignedzero key_mpp_rep" 302 else 303 delkeys="key_nosignedzero key_mpp_rep" 304 fi 288 if [ ${esmcycle} == y ] ; then 289 delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle" 305 290 else 306 291 delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle key_gas" … … 352 337 353 338 echo >> $outfile 354 echo "Move nemoexecutable to modipsl/bin" >> $outfile339 echo "Move NEMO executable to modipsl/bin" >> $outfile 355 340 echo ls -lrt $nemo_root/$cfg_wrk/BLD/bin >> $outfile 356 341 ls -lrt $nemo_root/$cfg_wrk/BLD/bin >> $outfile … … 358 343 359 344 if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then 360 if [ ${esmco2} == y ] && [ ${esmchem} == n ] ; then 361 mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCO2_${resol_oce}_${optmode} 362 elif [ ${esmco2} == y ] && [ ${esmchem} == y ] ; then 363 mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCYCLE_${resol_oce}_${optmode} 345 if [ ${esmcycle} == y ] ; then 346 mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCYCLE_${resol_oce}_${optmode} 364 347 else 365 348 mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${resol_oce}_${optmode} … … 370 353 ## 2.6 Compile LMDZ for regular latlon configuration 371 354 # If necessary compile INCA modele with AER configuration 372 if [ ${esmchem} == y ] ; then 373 cd $modipsl/modeles/INCA 374 #compile INCA regulat lat_lon chimie library 375 echo; echo "NOW COMPILE INCA ${optchimie} on resolution = ${resol_atm}" 355 cd $modipsl/modeles/INCA 356 #compile INCA regulat lat_lon chimie library 357 echo; echo "NOW COMPILE INCA ${optchimie} on resolution = ${resol_atm}" 358 359 if [ ${esmcycle} == y ] ; then 360 361 echo ./makeinca_fcm -chimie ${optchimie} -cplocninca -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 362 ./makeinca_fcm -chimie ${optchimie} -cplocninca -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 2>&1 363 else 376 364 echo ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 377 ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 2>&1 378 379 # Test if compiling finished 380 if [[ $? != 0 ]] ; then 381 echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP" 382 exit 383 fi 384 385 echo "Move inca.dat modipsl/bin" 386 if [[ -f $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat ]] ; then 387 mv $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat $modipsl/bin/inca_${optchimie}.dat ; 388 else 389 echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP" 390 exit 391 fi 392 393 echo "Move tracer.def to modipsl/bin" 394 if [[ -f $modipsl/modeles/INCA/tracer.def ]] ; then 395 mv $modipsl/modeles/INCA/tracer.def $modipsl/bin/tracer_${optchimie}.def ; 396 fi 397 398 399 400 fi 365 ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch} -arch_path $arch_path $full_flag $full_inca -cplocninca >> $outfile 2>&1 366 fi 367 368 # Test if compiling finished 369 if [[ $? != 0 ]] ; then 370 echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP" 371 exit 372 fi 373 374 echo "Move inca.dat to modipsl/bin" 375 if [[ -f $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat ]] ; then 376 mv $modipsl/modeles/INCA/SIMULATIONS/$optchimie/inca.dat $modipsl/bin/inca_${optchimie}.dat ; 377 else 378 echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP" 379 exit 380 fi 381 382 echo "Move tracer.def to modipsl/bin/tracer_${optchimie}.def" 383 if [[ -f $modipsl/modeles/INCA/tracer.def ]] ; then 384 mv $modipsl/modeles/INCA/tracer.def $modipsl/bin/tracer_${optchimie}.def ; 385 fi 401 386 402 387 … … 431 416 esac 432 417 433 if [ ${esmchem} == n ] ; then 434 echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 435 ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 436 else 437 #in esm aer case add chemistry option to lmdz compilation 438 echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 439 ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 440 fi 418 # In ESM AER case add chemistry option to LMDZ compilation 419 echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 420 ./makelmdz_fcm -d ${resol_atm} -c OMCT -cosp true $opt_rad -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 441 421 442 422 # Test if compiling finished … … 446 426 fi 447 427 448 449 428 # Move executables to modipsl/bin folder 450 429 echo >> $outfile … … 454 433 echo >> $outfile 455 434 456 457 435 suffix=_${resol_atm}_phylmd 458 436 suffix=${suffix}_${rad} 459 437 suffix=${suffix}_para_mem_orch_couple 460 if [ ${esmchem} == n ] ; then 461 suffix=${suffix}.e 462 else 463 suffix=${suffix}_inca.e 464 fi 438 suffix=${suffix}_inca.e 465 439 466 440 echo gcm suffix = $suffix 467 441 468 442 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then 469 if [ ${esmchem} == n ] ; then 470 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e 471 else 472 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_${optchimie}.e 473 fi 443 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_${optchimie}.e 444 cd $modipsl/bin 445 rm -f gcm_${resol_atm}_${optmode}.e 446 ln -s gcm_${resol_atm}_${optmode}_${optchimie}.e gcm_${resol_atm}_${optmode}.e 474 447 else 475 448 echo "ERROR gcm${suffix} executable does not exist." … … 478 451 fi 479 452 480 481 482 483 484 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 453 # Compile ce0l initialization program for LMDZ regular lat-lon executable 485 454 if [ $ce0l == y ] ; then 486 455 echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" … … 490 459 ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1 491 460 492 # 1er aout - remove xiosfrom ce0l compilation #461 # 1er aout - remove XIOS from ce0l compilation # 493 462 # echo ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 494 463 # ./makelmdz_fcm -d ${resol_atm} $opt_rad -$optmode -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1 … … 499 468 exit 500 469 fi 501 502 470 503 471 # Move executables to modipsl/bin folder
Note: See TracChangeset
for help on using the changeset viewer.