Changes between Initial Version and Version 1 of Documentation/UserGuide/ORCHIDEECNPInstall


Ignore:
Timestamp:
2016-02-24T10:09:59+01:00 (8 years ago)
Author:
dgoll
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/ORCHIDEECNPInstall

    v1 v1  
     1== HOWTO install/compile/run ORCHIDEE-CN-P for offline use with libIGCM. == 
     2This howto is based on the information which can be found in spread in the wiki as well as other sources. 
     3It aims at listing all steps needed from installing to running different experiments on a set of machines. 
     4Please check the wiki for more information regarding the respective commands listed here.  
     5 
     6=== 1. install libIGCM === 
     7==== 1.1 where to install ==== 
     8You should install the model NOT in the home directory; it is even too small to handle diagnostics like "out_execution" or "out_orchidee". 
     9You can use , for example, your work directory: 
     10curie: 
     11{{{ 
     12/ccc/work/cont003/dsm/<insert userID> 
     13}}} 
     14or project storage; here example for the IMBALANCE-P project on obelix: 
     15{{{ 
     16/home/surface3/<insert userID> 
     17}}} 
     18==== 1.2 install libIGCM & trunk ORCHIDEE ==== 
     19{{{ 
     20svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 
     21cd modipsl/util 
     22./model ORCHIDEE_trunk 
     23}}}  
     24 
     25=== 2. Exchange the trunk ORCHIDEE with ORCHIDEE-CN-P === 
     26{{{ 
     27cd ../modeles 
     28rm -fr ORCHIDEE 
     29svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-CN-P ORCHIDEE 
     30cd ../util ; ./ins_make 
     31}}} 
     32 
     33=== 3. Compile ORCHIDEE === 
     34adjust IOIPSL to be able to write more variables; increase value of max_var by 50 in ../modeles/IOIPSL/src/restcom.f90 
     35{{{ 
     36 &  max_var=550, max_file=50, max_dim=NF90_MAX_VAR_DIMS 
     37}}} 
     38then go and compile ORCHIDEE 
     39 
     40==== on obelix ==== 
     41{{{ 
     42cd ../modeles/ORCHIDEE   
     43}}} 
     44First do a "normal" make to compile XIOS & IPOSL components which are needed; don't worry if the compilation of ORCHIDEE crashes 
     45{{{ 
     46make 
     47}}} 
     48then compile 
     49{{{ 
     50./makeorchidee_fcm -driver -arch ifort_LSCE -noxios 
     51}}} 
     52 
     53==== on curie ==== 
     54WARNING: before you do anything on curie; make sure you have copied the p86ipsl login environment to your home 
     55according to [https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/DocBenvBtgcc]: 
     56{{{ 
     57cp ~p86ipsl/.bashrc_curie  ~/. 
     58cp ~p86ipsl/.bash_profile ~/. 
     59}}} 
     60  
     61 
     62Then compile the standard way: 
     63{{{ 
     64cd ../config/ORCHIDEE_OL 
     65gmake without_xios 
     66}}} 
     67 
     68 
     69Optional: I usually re-compile ORCHIDEE again with makeorchidee_fcm to set options (don't forget to disable xios): 
     70{{{ 
     71cd ../../modeles/ORCHIDEE 
     72./makeorchidee_fcm -driver -parallel mpi -arch X64_CURIE -driver -noxios 
     73}}} 
     74 
     75 
     76=== 4. Run ORCHIDEE (obelix) === 
     77==== 4.1 SPINUP_ANALYTIC ==== 
     78===== 4.1.1 create new experiment folder ===== 
     79{{{ 
     80cd ../../config/ORCHIDEE_OL/ 
     81cp -fr SPINUP_ANALYTIC/ MY_SPINUP_ANALYTIC/ 
     82cd MY_SPINUP_ANALYTIC/ 
     83}}} 
     84===== 4.1.2 tell libIGCM about the new input files (write me an email if you need them) ===== 
     85modify the variable "ListNonDel" in COMP/stomate.card: 
     86{{{ 
     87ListNonDel= (${R_IN}/SRF/reftemp.nc, .), \        
     88(<insert path>/USDA_SoilSuborder.nc, .), \ 
     89(<insert path>/lithology.nc, .), \ 
     90(<insert path>/deposition.nc, .) 
     91}}} 
     92WARNING: 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. 
     93 
     94tell that we use the new “soil_param.nc”; in COMP/sechiba.card: 
     95{{{ 
     96(<insert path>/soils_param.nc, .), \ 
     97}}} 
     98===== 4.1.3 adjust the libIGCM  ===== 
     99 
     100disable XIOS  in COMP/orchidee_ol.card 
     101{{{ 
     102# Use XIOS as output library instead of IOIPSL 
     103XIOS=n 
     104}}} 
     105disable XIOS  in PARAM/run.def 
     106{{{ 
     107# Use XIOS for writing diagnostics file 
     108# defulat = n 
     109XIOS_ORCHIDEE_OK = n 
     110}}} 
     111set the IO frequency to avoid crashes in PARAM/run.def 
     112{{{ 
     113# Writefrequency in seconds in sechiba_history.nc 
     114# default = 86400.0 
     115WRITE_STEP = 1800.0 
     116 
     117# Writefrequency in days in stomate_history.nc 
     118# default = 10. 
     119STOMATE_HIST_DT = 1 
     120}}} 
     121 
     122add the new flags for the nutrient cycles in PARAM/run.def: 
     123{{{ 
     124# to activate P cycle set =y 
     125STOMATE_OK_PCYCLE=y 
     126# to activate N cycle set =y 
     127STOMATE_OK_NCYCLE=y 
     128# make sure we dont fake 
     129LD_FAKE_HEIGHT=n 
     130# you can enable mass conservation and stoichiometry checks by =y 
     131STOMATE_MASS_CONSERVATION=y 
     132STOMATE_DSG_DEBUG=y 
     133}}} 
     134in addition you should  add all the PFT and soil parameter values as set in  
     135/home/users/dgoll/ORCHIDEE/DEFS_n_CARDS/run.def 
     136 
     137disable river routing if you run on non-global scale in run.def 
     138{{{ 
     139# Activate river routing 
     140RIVER_ROUTING = n 
     141}}} 
     142 
     143 
     144===== 4.1.4 adjust the job as usual ===== 
     145modify config.card as usual (see wiki) 
     146 
     147modify run.def as usual (see wiki) 
     148plus 
     149if you want to archive, for example in the IMBALANCE-P storage; add to config.card: 
     150{{{ 
     151ARCHIVE=/home/surface3/dgoll  
     152}}}  
     153 
     154===== 4.1.5 create job ===== 
     155{{{ 
     156../../../libIGCM/ins_job 
     157}}} 
     158 
     159===== 4.1.6 adjust job_file (optional) ===== 
     160 
     161Header to run a site scale simulation on obelix 
     162{{{ 
     163###################### 
     164        ## OBELIX      LSCE ## 
     165        ###################### 
     166        #PBS -N test 
     167        #PBS -m a 
     168        #PBS -j oe 
     169        #PBS -q short 
     170        #PBS -o Script_Output_test.000001 
     171        #PBS -S /bin/ksh 
     172        #PBS -v BATCH_NUM_PROC_TOT=1 
     173        #PBS -l nodes=1:ppn=1 
     174}}} 
     175 
     176to automatically have existing files deleted, set JobType=DEV 
     177{{{ 
     178        #D- Experience type : DEB(ug), DEV(elopment), RUN (default) 
     179        JobType=DEV  
     180}}} 
     181to avoid queuing take full advantage of your job time; the value depends on #PBS -q short and computation time of orchidee 
     182{{{ 
     183#D- Number of execution in one job 
     184        PeriodNb=60 
     185}}} 
     186 
     187to have a temp directory you can access on obelix; exchange dgoll with your ID 
     188{{{ 
     189#D- Define running directory 
     190#D- Default=${TMPDIR} ie temporary batch directory 
     191#D- 
     192#RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine 
     193RUN_DIR_PATH=/home/scratch01/<insert userid>/RUN_DIR 
     194}}} 
     195===== 4.1.7 submit the job  ===== 
     196on obelix: 
     197{{{ 
     198qsub Job_ID 
     199}}} 
     200on curie 
     201{{{ 
     202ccc_msub Job_ID 
     203}}} 
     204==== 4.2 ENSEMBLE: fluxnet sites [http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation] ==== 
     205===== 4.2.1 create new experiment folder ===== 
     206{{{ 
     207cd ../../config/ORCHIDEE_OL/ 
     208cp -fr ENSEMBLE/ MY_ENSEMBLE/ 
     209cd MY_ENSEMBLE/ 
     210}}} 
     211 
     212===== 4.2.2 tell libIGCM about the new input files (write me an email if you need them) ===== 
     213The configuration which are used are stored in  
     214../SPINUP/SUBJOB/OOL_SEC_STO/COMP/ 
     215so, do as in 4.1.2: change the path of soil_param.nc and add the new files  
     216 
     217sechiba.card: 
     218{{{ 
     219(/home/scratch01/dgoll/ORCHIDEE/ORC-CNP/simulations/simple_forcing_DSG/soils_param.nc, .), \ 
     220}}} 
     221stomate.card: 
     222{{{ 
     223ListNonDel= (${R_IN}/SRF/reftemp.nc, .) \         
     224(<insert path>/USDA_SoilSuborder.nc, .), \ 
     225(<insert path>/lithology.nc, .), \ 
     226(<insert path>/deposition.nc, .) 
     227}}} 
     228WARNING: 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. 
     229 
     230===== 4.2.3 adjust the libIGCM  ===== 
     231 
     232add the new flags for the nutrient cycles in fluxnet.card: 
     233{{{ 
     234# to activate P cycle set =y 
     235STOMATE_OK_PCYCLE=y 
     236# to activate N cycle set =y 
     237STOMATE_OK_NCYCLE=y 
     238# make sure we dont fake 
     239LD_FAKE_HEIGHT=n 
     240# you can enable mass conservation and stoichiometry checks by =y 
     241STOMATE_MASS_CONSERVATION=y 
     242STOMATE_DSG_DEBUG=y 
     243}}} 
     244you need to add defaults for these switches into PARAM/orchidee.default 
     245{{{ 
     246# STOMATE_OK_NCYLE ([FLAG]) :  Activate the nitrogen cycle {OK_STOMATE} 
     247STOMATE_OK_NCYCLE = n 
     248 
     249# STOMATE_OK_PCYLE ([FLAG]) :  Activate the phosphorus cycle {OK_STOMATE} 
     250STOMATE_OK_PCYCLE = n 
     251 
     252# STOMATE_MASS_CONSERVATION ([FLAG]) : activate mass conservation checks which force stop if violated {OK_STOMATE} 
     253STOMATE_MASS_CONSERVATION = n 
     254 
     255# STOMATE_DSG_DEBUG ([FLAG]) : activate checks for stoichiometry and negative pools {OK_STOMATE} 
     256STOMATE_DSG_DEBUG = n 
     257 
     258# LD_FAKE_HEIGHT ([FLAG]) : fakes height of vegetation (ORCHIDEE-CAN related) {OK_STOMATE} 
     259LD_FAKE_HEIGHT = n 
     260 
     261}}} 
     262 
     263specify the spinup simulations in the config.card: 
     264{{{ 
     265[SPINUP]                                                                               
     266# Initialisation for spin-up :                                                         
     267# orchidee with sechiba alone (!!! if ok_stomate == n !!!)                             
     268duree_nostomate=0                                                                      
     269# orchidee with stomate; number of years before n_iter cycles of duree_sechiba years of analytical spinup cycles 
     270duree_inistomate=250                                                                   
     271# teststomate (only if duree_inistomate > 0)                                           
     272duree_offlineini=0                                                                     
     273                                                                                       
     274# Loop over ORCHIDEE runs (used for spin-up)                                           
     275# The whole job is restarted n_iter times                                              
     276#  n_iter: the number of cycles with duree_sechiba years 
     277n_iter=3                                                                               
     278# orchidee with sechiba (and stomate if ok_stomate=y below)                            
     279duree_sechiba=50                                                                       
     280 
     281# teststomate                                                                          
     282duree_stomate=0                                                                        
     283# forcesoil                                                                            
     284duree_carbonsol=1                                                                      
     285                                                                                       
     286# Final run (full ORCHIDEE)                                                            
     287# This last parameter must be non-zero.                                                
     288duree_final=100   
     289}}} 
     290 
     291xios is per default disabled in "PARAM/orchidee.default" 
     292routing is per default disabled in "fluxnet.card" 
     293 
     294===== 4.2.4 adjust the job as usual ===== 
     295modify config.card as usual ([http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation]) 
     296 
     297modify run.def as usual ([http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation]) 
     298 
     299if you want to archive set the variable ARCHIVE, here the example for IMBALANCE-P storage; add to config.card: 
     300{{{ 
     301ARCHIVE=/home/surface3/<insert path>  
     302}}}  
     303===== 4.2.5 create job ===== 
     304{{{ 
     305../../../libIGCM/ins_job 
     306}}} 
     307 
     308===== 4.2.6 adjust job  (optional) ===== 
     309 
     310===== 4.2.7 start simulations ===== 
     311{{{ 
     312my_prompt>> ksh 
     313my_prompt>> nohup ./Job_ENSEMBLE fluxnet > out_Job 2>&1 & 
     314}}} 
     315===== 4.2.8 check simulations ===== 
     316{{{ 
     317ccc_mstat -u userid 
     318}}} 
     319{{{ 
     320ccc_mdel jobid 
     321}}}