Changes between Version 96 and Version 97 of DevelopmentActivities/ORCHIDEE-CNP


Ignore:
Timestamp:
2016-03-15T14:03:28+01:00 (8 years ago)
Author:
dgoll
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopmentActivities/ORCHIDEE-CNP

    v96 v97  
    7272 
    7373 
    74 == 5.0 unresolved Issues == 
     74== 5. unresolved Issues == 
    7575 
    7676There are still unresolved issue with the model. They are listed here: [https://forge.ipsl.jussieu.fr/orchidee/wiki/DevelopmentActivities/ORCHIDEE-CNP/issues] 
    7777 
    78 ---- 
    79 ---- 
    80  
    81 == HOWTO install/compile/run ORCHIDEE-CN-P for offline use with libIGCM. == 
    82 This howto is based on the information which can be found in the ORCHIDEE wiki regarding the trunk version of ORCHIDEE. 
    83 Please check the wiki for information regarding the respective commands listed here.  
    84  
    85 === 1. install libIGCM === 
    86 ==== 1.1 where to install ==== 
    87 You should install the model NOT in the home directory; it is even too small to handle diagnostics like "out_execution" or "out_orchidee". 
    88 You can use , for example, your work directory: 
    89 curie: 
    90 {{{ 
    91 /ccc/work/cont003/dsm/<userID> 
    92 }}} 
    93 or project storage; here example for the IMBALANCE-P project on obelix: 
    94 {{{ 
    95 /home/surface3/dgoll 
    96 }}} 
    97 ==== 1.2 install libIGCM & trunk ORCHIDEE ==== 
    98 {{{ 
    99 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 
    100 cd modipsl/util 
    101 ./model ORCHIDEE_trunk 
    102 }}}  
    103  
    104 === 2. Exchange the trunk ORCHIDEE with ORCHIDEE-CN-P === 
    105 {{{ 
    106 cd ../modeles 
    107 rm -fr ORCHIDEE 
    108 svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-CN-P ORCHIDEE 
    109 cd ../util ; ./ins_make 
    110 }}} 
    111  
    112 === 3. Compile ORCHIDEE === 
    113 adjust IOIPSL to be able to write more variables; increase value of max_var by 50 in ../modeles/IOIPSL/src/restcom.f90 
    114 {{{ 
    115  &  max_var=550, max_file=50, max_dim=NF90_MAX_VAR_DIMS 
    116 }}} 
    117 then go and compile ORCHIDEE 
    118  
    119 ==== on obelix ==== 
    120 {{{ 
    121 cd ../modeles/ORCHIDEE   
    122 }}} 
    123 First do a "normal" make to compile XIOS & IPOSL components which are needed; don't worry if the compilation of ORCHIDEE crashes 
    124 {{{ 
    125 make 
    126 }}} 
    127 then compile (do compile always with "-parallel mpi" as this executable can be run in sequential mode, too. But not vice versa) 
    128 {{{ 
    129 ./makeorchidee_fcm -driver -arch ifort_LSCE -noxios -parallel mpi 
    130 }}} 
    131  
    132 ==== on curie ==== 
    133 WARNING: before you do anything on curie; make sure you have copied the p86ipsl login environment to your home 
    134 according to [https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/DocBenvBtgcc]: 
    135 {{{ 
    136 cp ~p86ipsl/.bashrc_curie  ~/. 
    137 cp ~p86ipsl/.bash_profile ~/. 
    138 }}} 
    139   
    140  
    141 Then compile the standard way: 
    142 {{{ 
    143 cd ../config/ORCHIDEE_OL 
    144 gmake without_xios 
    145 }}} 
    146  
    147  
    148 Optional: I usually re-compile ORCHIDEE again with makeorchidee_fcm to set options (don't forget to disable xios): 
    149 {{{ 
    150 cd ../../modeles/ORCHIDEE 
    151 ./makeorchidee_fcm -driver -parallel mpi -arch X64_CURIE -driver -noxios 
    152 }}} 
    153  
    154  
    155 === 4. Run ORCHIDEE (obelix) === 
    156 ==== 4.1 SPINUP_ANALYTIC ==== 
    157 ===== 4.1.1 create new experiment folder ===== 
    158 {{{ 
    159 cd ../../config/ORCHIDEE_OL/ 
    160 cp -fr SPINUP_ANALYTIC/ MY_SPINUP_ANALYTIC/ 
    161 cd MY_SPINUP_ANALYTIC/ 
    162 }}} 
    163 ===== 4.1.2 tell libIGCM about the new input files (write me an email if you need them) ===== 
    164 modify the variable "ListNonDel" in COMP/stomate.card: 
    165 {{{ 
    166 ListNonDel= (${R_IN}/SRF/reftemp.nc, .), \        
    167 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/USDA_SoilSuborder.nc, .), \ 
    168 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/lithology.nc, .), \ 
    169 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/deposition.nc, .) 
    170 }}} 
    171 WARNING: the deposition file is a static field at the moment; it does not include N deposition either. At the moment N deposition is set to P deposition in the ORCHIDEE code. Anyway N deposition is not accounted for in the calculations for the N & P cycle for now. 
    172  
    173 tell that we use the new “soil_param.nc”; in COMP/sechiba.card: 
    174 {{{ 
    175 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/soils_param.nc, .), \ 
    176 }}} 
    177 ===== 4.1.3 adjust the libIGCM  ===== 
    178  
    179 disable XIOS  in COMP/orchidee_ol.card 
    180 {{{ 
    181 # Use XIOS as output library instead of IOIPSL 
    182 XIOS=n 
    183 }}} 
    184 disable XIOS  in PARAM/run.def 
    185 {{{ 
    186 # Use XIOS for writing diagnostics file 
    187 # defulat = n 
    188 XIOS_ORCHIDEE_OK = n 
    189 }}} 
    190 set the IO frequency to avoid crashes in PARAM/run.def 
    191 {{{ 
    192 # Writefrequency in seconds in sechiba_history.nc 
    193 # default = 86400.0 
    194 WRITE_STEP = 1800.0 
    195  
    196 # Writefrequency in days in stomate_history.nc 
    197 # default = 10. 
    198 STOMATE_HIST_DT = 1 
    199 }}} 
    200  
    201 add the new flags for the nutrient cycles in PARAM/run.def: 
    202 {{{ 
    203 # to activate P cycle set =y 
    204 STOMATE_OK_PCYCLE=y 
    205 # to activate N cycle set =y 
    206 STOMATE_OK_NCYCLE=y 
    207 # make sure we dont fake 
    208 LD_FAKE_HEIGHT=n 
    209 # you can enable mass conservation and stoichiometry checks by =y 
    210 STOMATE_MASS_CONSERVATION=y 
    211 STOMATE_DSG_DEBUG=y 
    212 }}} 
    213 in addition you should  add all the PFT and soil parameter values as set in  
    214 /home/users/dgoll/ORCHIDEE/DEFS_n_CARDS/run.def 
    215  
    216 disable river routing if you run on non-global scale in run.def 
    217 {{{ 
    218 # Activate river routing 
    219 RIVER_ROUTING = n 
    220 }}} 
    221  
    222  
    223 ===== 4.1.4 adjust the job as usual ===== 
    224 modify config.card as usual (see wiki) 
    225  
    226 modify run.def as usual (see wiki) 
    227 plus 
    228 if you want to archive, for example in the IMBALANCE-P storage; add to config.card: 
    229 {{{ 
    230 ARCHIVE=/home/surface3/dgoll  
    231 }}}  
    232  
    233 ===== 4.1.5 create job ===== 
    234 {{{ 
    235 ../../../libIGCM/ins_job 
    236 }}} 
    237  
    238 ===== 4.1.6 adjust job_file (optional) ===== 
    239  
    240 Header to run a site scale simulation on obelix 
    241 {{{ 
    242 ###################### 
    243         ## OBELIX      LSCE ## 
    244         ###################### 
    245         #PBS -N test 
    246         #PBS -m a 
    247         #PBS -j oe 
    248         #PBS -q short 
    249         #PBS -o Script_Output_test.000001 
    250         #PBS -S /bin/ksh 
    251         #PBS -v BATCH_NUM_PROC_TOT=1 
    252         #PBS -l nodes=1:ppn=1 
    253 }}} 
    254  
    255 to automatically have existing files deleted, set JobType=DEV 
    256 {{{ 
    257         #D- Experience type : DEB(ug), DEV(elopment), RUN (default) 
    258         JobType=DEV  
    259 }}} 
    260 to avoid queuing take full advantage of your job time; the value depends on #PBS -q short and computation time of orchidee 
    261 {{{ 
    262 #D- Number of execution in one job 
    263         PeriodNb=60 
    264 }}} 
    265  
    266 to have a temp directory you can access on obelix; exchange dgoll with your ID 
    267 {{{ 
    268 #D- Define running directory 
    269 #D- Default=${TMPDIR} ie temporary batch directory 
    270 #D- 
    271 #RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine 
    272 RUN_DIR_PATH=/home/scratch01/dgoll/RUN_DIR 
    273 }}} 
    274 ===== 4.1.7 submit the job  ===== 
    275 on obelix: 
    276 {{{ 
    277 qsub Job_ID 
    278 }}} 
    279 on curie 
    280 {{{ 
    281 ccc_msub Job_ID 
    282 }}} 
    283 ==== 4.2 ENSEMBLE: fluxnet sites [http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation] ==== 
    284 ===== 4.2.1 create new experiment folder ===== 
    285 {{{ 
    286 cd ../../config/ORCHIDEE_OL/ 
    287 cp -fr ENSEMBLE/ MY_ENSEMBLE/ 
    288 cd MY_ENSEMBLE/ 
    289 }}} 
    290  
    291 ===== 4.2.2 tell libIGCM about the new input files (write me an email if you need them) ===== 
    292 The configuration which are used are stored in  
    293 ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/ 
    294 so, do as in 4.1.2: change the path of soil_param.nc and add the new files  
    295  
    296 sechiba.card: 
    297 {{{ 
    298 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/soils_param.nc, .), \ 
    299 }}} 
    300 stomate.card: 
    301 {{{ 
    302 ListNonDel= (${R_IN}/SRF/reftemp.nc, .) \         
    303 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/USDA_SoilSuborder.nc, .), \ 
    304 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/lithology.nc, .), \ 
    305 (/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/deposition.nc, .) 
    306 }}} 
    307 WARNING: the deposition file is a static field at the moment; it does not include N deposition either. At the moment N deposition is set to P deposition in the ORCHIDEE code. Anyway N deposition is not accounted for in the calculations for the N & P cycle for now. 
    308  
    309 copy a run.def with all parameters needed to PARAM, for example this one: 
    310 {{{ 
    311 cp ~/ORCHIDEE/DEFS_n_CARDS/run.def_NV PARAM/run.def 
    312 }}} 
    313  
    314 ===== 4.2.3 adjust the libIGCM  ===== 
    315  
    316 add the new flags for the nutrient cycles in fluxnet.card: 
    317 {{{ 
    318 # to activate P cycle set =y 
    319 STOMATE_OK_PCYCLE=y 
    320 # to activate N cycle set =y 
    321 STOMATE_OK_NCYCLE=y 
    322 # make sure we dont fake 
    323 LD_FAKE_HEIGHT=n 
    324 # you can enable mass conservation and stoichiometry checks by =y 
    325 STOMATE_MASS_CONSERVATION=y 
    326 STOMATE_DSG_DEBUG=y 
    327 }}} 
    328 you need to add defaults for these switches into PARAM/orchidee.default 
    329 {{{ 
    330 # STOMATE_OK_NCYLE ([FLAG]) :  Activate the nitrogen cycle {OK_STOMATE} 
    331 STOMATE_OK_NCYCLE = n 
    332  
    333 # STOMATE_OK_PCYLE ([FLAG]) :  Activate the phosphorus cycle {OK_STOMATE} 
    334 STOMATE_OK_PCYCLE = n 
    335  
    336 # STOMATE_MASS_CONSERVATION ([FLAG]) : activate mass conservation checks which force stop if violated {OK_STOMATE} 
    337 STOMATE_MASS_CONSERVATION = n 
    338  
    339 # STOMATE_DSG_DEBUG ([FLAG]) : activate checks for stoichiometry and negative pools {OK_STOMATE} 
    340 STOMATE_DSG_DEBUG = n 
    341  
    342 # LD_FAKE_HEIGHT ([FLAG]) : fakes height of vegetation (ORCHIDEE-CAN related) {OK_STOMATE} 
    343 LD_FAKE_HEIGHT = n 
    344  
    345 }}} 
    346  
    347 specify the spinup simulations in the config.card: 
    348 {{{ 
    349 [SPINUP]                                                                               
    350 # Initialisation for spin-up :                                                         
    351 # orchidee with sechiba alone (!!! if ok_stomate == n !!!)                             
    352 duree_nostomate=0                                                                      
    353 # orchidee with stomate; number of years before n_iter cycles of duree_sechiba years of analytical spinup cycles 
    354 duree_inistomate=250                                                                   
    355 # teststomate (only if duree_inistomate > 0)                                           
    356 duree_offlineini=0                                                                     
    357                                                                                        
    358 # Loop over ORCHIDEE runs (used for spin-up)                                           
    359 # The whole job is restarted n_iter times                                              
    360 #  n_iter: the number of cycles with duree_sechiba years 
    361 n_iter=3                                                                               
    362 # orchidee with sechiba (and stomate if ok_stomate=y below)                            
    363 duree_sechiba=50                                                                       
    364  
    365 # teststomate                                                                          
    366 duree_stomate=0                                                                        
    367 # forcesoil                                                                            
    368 duree_carbonsol=1                                                                      
    369                                                                                        
    370 # Final run (full ORCHIDEE)                                                            
    371 # This last parameter must be non-zero.                                                
    372 duree_final=100   
    373 }}} 
    374  
    375 xios is per default disabled in "PARAM/orchidee.default" 
    376 routing is per default disabled in "fluxnet.card" 
    377  
    378 ===== 4.2.4 adjust the job as usual ===== 
    379 modify config.card as usual ([http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation]) 
    380  
    381 modify run.def as usual ([http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation]) 
    382 plus 
    383 if you want to archive, for example in the IMBALANCE-P storage; add to config.card: 
    384 {{{ 
    385 ARCHIVE=/home/surface3/dgoll  
    386 }}}  
    387  
    388 modify fluxnet.card as usual (no information): 
    389 - if you want to keep the output files of the spinup you need to set the following variables 
    390 {{{ 
    391 # DEBUG mode for SPINUP  
    392 # 
    393 # This mode keep all SPINUP directory in ARCHIVE 
    394 # If disable, all ARCHIVE is automaticly cleaned. 
    395 DEBUG_SPIN=y 
    396 # If you don't want to keep old spinup steps, but last one 
    397 CONSERVE=y 
    398 }}} 
    399  
    400 ===== 4.2.5 create job ===== 
    401 {{{ 
    402 ../../../libIGCM/ins_job 
    403 }}} 
    404  
    405 ===== 4.2.6 adjust job  (optional) ===== 
    406  
    407 ===== 4.2.7 start simulations ===== 
    408 {{{ 
    409 my_prompt>> ksh 
    410 my_prompt>> nohup ./Job_ENSEMBLE fluxnet > out_Job 2>&1 & 
    411 }}} 
    412 ===== 4.2.8 check simulations ===== 
    413 to see the decomposition of the spatial domain among the processors check in the run dir "Load_balance_orchidee.dat" 
    414  
    415  
    416 on curie 
    417 {{{ 
    418 ccc_mstat -u userid 
    419 }}} 
    420 {{{ 
    421 ccc_mdel jobid 
    422 }}} 
    423  
    424 ===== 4.2.8 post processing ===== 
    425 ensure the Jobname and the path to the reference simulation is set in fluxnet.card; in case there is no reference set it to NONE 
    426 {{{ 
    427 # History file of former ORCHIDEE runs (Reference) to compare with the current simulations 
    428 reference_base_path=/home/scratch01/dgoll/IGCM_OUT/OL2/DEVT/ensemble 
    429 reference_config=DSG04EnsCN 
    430 }}} 
     78== 6.0 Howto install, compile & run the model == 
     79You can find information on how to setup the simulations here: [https://forge.ipsl.jussieu.fr/orchidee/wiki/DevelopmentActivities/ORCHIDEE-CNP/howtoUse]