- Timestamp:
- 07/10/19 09:14:20 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh
r4472 r4611 11 11 modipsl=$submitdir/../.. 12 12 arch_path=$submitdir/ARCH 13 mysrc_path=$submitdir/SOURCES 13 14 14 15 #### Set default options … … 18 19 resol_oce=ORCA1 19 20 # Version of ice model lim2/lim3 20 version_lim=lim3 21 icemodel=lim3 22 # Coupled with ocean biogeochemistry (y/n) 23 oceanbio=y 21 24 # Version ESM CO2: CO2 interactif ocean/atmosphere (y/n) 22 25 esmco2=n … … 31 34 export fcm_arch parallel xios 32 35 full_flag="" 36 full_nemo=n 33 37 # Default netcdf_lib is used for XIOS but can be change by argument 34 38 netcdf_lib="" … … 53 57 54 58 55 Options: [LR / VLR / MR 025] Model resolution, choose only one. Default: LR.59 Options: [LR / VLR / MR1 / MR025] Model resolution, choose only one. Default: LR. 56 60 [ESMCO2] Compile IPSLCM6 for CO2 interactif ocean/atmosphere. 57 61 [-full] Full recompilation of all components. This option can be added to all other options. 62 [-cleannemo] Full recompilation of NEMO component only. 58 63 [-debug / -dev / -prod] Level of optimization. One of these can be added to all other compile options. Default: -prod. 59 64 … … 68 73 69 74 Example 3: Compilation of IPSLCM6 for ESM CO2 70 ./compile_ipslcm6.sh ESMCO2 75 ./compile_ipslcm6.sh ESMCO2 -cleannemo 71 76 72 77 Example 4: Default resoltuion (LR) compiled in debug mode … … 82 87 exit;; 83 88 84 "VLR") 85 resol_atm=96x95x39; resol_oce=ORCA1 ; version_lim=lim2; shift ;; 86 87 "LR") 88 resol_atm=144x142x79; resol_oce=ORCA1 ; version_lim=lim3; shift ;; 89 90 "MR025") 91 resol_atm=256x256x79; resol_oce=ORCA025 ; version_lim=lim3; shift ;; 92 93 "ESMCO2") 89 "VLR") 90 resol_atm=96x95x39; resol_oce=ORCA2 ; icemodel=lim2; oceanbio=y; shift ;; 91 92 "LR") 93 resol_atm=144x142x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;; 94 95 "MR1") 96 resol_atm=256x256x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;; 97 98 "MR025") 99 resol_atm=256x256x79; resol_oce=ORCA025 ; icemodel=lim3; oceanbio=n; shift ;; 100 101 "ESMCO2") 94 102 esmco2=y; shift ;; 95 103 … … 109 117 optmode=prod ; shift ;; 110 118 111 "-full") 112 full_flag="-full"; shift ;; 119 "-full") 120 full_flag="-full"; full_nemo=y ; shift ;; 121 122 "-cleannemo") 123 full_nemo=y ; shift ;; 113 124 114 125 "-netcdf_lib_seq") … … 122 133 123 134 echo "Following options are set in current compiling:" >> $outfile 124 echo " resol_atm=${resol_atm}, resol_oce=${resol_oce}, $version_lim=${version_lim}" >> $outfile135 echo " resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, withpisces=${pisces}" >> $outfile 125 136 echo " esmco2=${esmco2}" >> $outfile 126 137 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag" >> $outfile … … 192 203 fi 193 204 194 ## 2.2 Compile xios 205 ## 2.2 Compile oasis3-mct 206 oasis_dir=$modipsl/oasis3-mct 207 echo; echo "NOW COMPILE OASIS3-MCT" 208 echo >> $outfile ; echo " NOW COMPILE OASIS3-MCT" >> $outfile 209 cd $oasis_dir/util/make_dir ; cp $mysrc_path/OASIS3-MCT/make_${fcm_arch} make.inc ; make -f TopMakefileOasis3 ; 210 211 ## 2.3 Compile xios 195 212 cd $modipsl/modeles/XIOS 196 213 echo; echo "NOW COMPILE XIOS" … … 212 229 213 230 214 ## 2. 3Compile orchidee231 ## 2.4 Compile orchidee 215 232 cd $modipsl/modeles/ORCHIDEE 216 233 echo; echo "NOW COMPILE ORCHIDEE" … … 226 243 227 244 228 ## 2.4 Compile LMDZ for regular latlon configuration 245 ## 2.5 Compile NEMO 246 nemo_root=$modipsl/modeles/NEMOGCM/CONFIG 247 if [ ${icemodel} == lim2 ] ; then 248 addkeys="key_lim2_vp key_diahth key_oasis3" 249 delkeys="key_nosignedzero key_mpp_rep" 250 else 251 addkeys="key_top key_pisces key_age key_cfc key_cpl_carbon_cycle key_gas key_oasis" 252 if [ ${oceanbio} == y ] ; then 253 if [ ${esmco2} == y ] ; then 254 delkeys="key_nosignedzero key_mpp_rep" 255 else 256 delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle key_gas" 257 fi 258 else 259 delkeys="key_nosignedzero key_mpp_rep key_top key_pisces key_cfc key_age key_cpl_carbon_cycle key_gas" 260 fi 261 fi 262 263 if [ ${oceanbio} == n ] ; then 264 echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES" 265 echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES" >> $outfile 266 else 267 echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES" 268 echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES" >> $outfile 269 fi 270 echo >> $outfile ; echo cd $nemo_root >> $outfile 271 echo >> $outfile ; echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/arch-${fcm_arch}.fcm ../ARCH/. >> $outfile 272 echo >> $outfile 273 274 cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm ../ARCH/. 275 276 if [ ${resol_oce} == ORCA2 ] ; then cfg_wrk=ORCA2_LIM_PISCES ; fi 277 if [ ${resol_oce} == ORCA1 ] ; then cfg_wrk=ORCA1_LIM3_PISCES ; fi 278 if [ ${resol_oce} == ORCA025 ] ; then cfg_wrk=ORCA025_LIM3_PISCES ; fi 279 280 echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/ >> $outfile 281 echo >> $outfile 282 cp $mysrc_path/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/ 283 284 if [ $full_nemo == y ] ; then 285 echo ./makenemo -m ${fcm_arch} -n $cfg_wrk clean >> $outfile 286 echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile 287 echo >> $outfile 288 ./makenemo -m ${fcm_arch} -n $cfg_wrk clean >> $outfile 2>&1 289 ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile 2>&1 290 else 291 echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile 292 echo >> $outfile 293 ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys" del_key "$delkeys" >> $outfile 2>&1 294 fi 295 296 # Test if compiling finished 297 if [[ $? != 0 ]] ; then 298 echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP" 299 exit 300 fi 301 302 echo 303 echo "copy nemo executable to modipsl/bin" 304 if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then cp $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa ; fi 305 if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] && [ ${esmco2} == y ] ; then cp $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.esm ; fi 306 307 308 ## 2.6 Compile LMDZ for regular latlon configuration 229 309 cd $modipsl/modeles/LMDZ 230 310 # Compile LMDZ regular lat-lon exectuable
Note: See TracChangeset
for help on using the changeset viewer.