Changes between Version 8 and Version 9 of Documentation/UserGuide/FLUXNETValidation


Ignore:
Timestamp:
2018-12-20T14:18:46+01:00 (6 years ago)
Author:
mmcgrath
Comment:

Started from a clean SVN install on obelix with new ORCHIDEE_OL for CN-CAN

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/FLUXNETValidation

    v8 v9  
     1This was tested for ORCHIDEE-CN-CAN (r5678 of ORCHIDEE and r5673 of ORCHIDEE_OL) on obelix. 
     2 
    13First, look at Nicolas's page. 
    24 
     
    57And then look at the README file in config/ORCHIDEE_OL/ENSEMBLE. 
    68 
    7 Now, if you are using ORCHIDEE-CN-CAN, you need to do some other things.  I am running on Obelix. 
     9Be sure you have checked out both CN-CAN modeles/ORCHIDEE and config/ORCHIDEE_OL (Documentation/UserGuide/ORCHIDEEDOFOCOInstall). 
    810 
    9 Start from a clean SVN ENSEMBLE install.  Notice that Job\_ENSEMBLE is the main driver, and it should not be deleted!  It will create jobs based on ../SPINUP/SUBJOB/OOL\_SEC\_STO/. 
     11Be sure that ioipsl_debug=.FALSE. in modeles/IOIPSL/src/errioipsl.f90.  Otherwise, the output files become huge because of the high frequency writes combined with the debug information. 
    1012 
    11 First, a change in the IOIPSL source code needs to be made, with a recompile. 
    12 In modeles/IOIPSL/src/histcom.f90, change nb\_zax\_max=20.  Recompile. 
     13Start from a clean SVN ENSEMBLE install.  Notice that ENSEMBLE/Job_ENSEMBLE is the main driver, and it should not be deleted!  This is what I refer to when I say "Nicolas's FLUXNET scripts".  It will create jobs based on SPINUP/SUBJOB/OOL_SEC_STO/. 
     14 
     15I have found the following files are used.  Care should be made to make sure that conflicting options are not specified in these files (assuming you are running analytical spinup, sechiba, and stomate): 
    1316 
    1417{{{ 
    15 cd ~/ORCHIDEE-CN-CAN/config/ORCHIDEE_OL/ENSEMBLE 
     18ENSEMBLE/fluxnet.card 
     19ENSEMBLE/PARAM/run.def 
     20SPINUP/COMP/spinup.card 
     21SPINUP/SUBJOBS/OOL_SEC_STO/COMP/sechiba.card 
     22SPINUP/SUBJOBS/OOL_SEC_STO/COMP/stomate.card 
     23}}} 
     24 
     25I am uncertain what the priority is.  All of the .card files add things onto the end of the run.def, and I believe fluxnet.card takes priority over the others in case of conflict. 
     26 
     27I have noticed that the script will complain if a value is specified in fluxnet.card but not the run.def.  It will not complain if a value is specified in run.def and not fluxnet.card.  Check the [UserChoices] and [SubJobParams] sections of fluxnet.card.  Many of the UserChoices are already in SPINUP/COMP/spinup.card, and many of the SubJobParams are in the run.def.  It seems that the scripts make decisions based on what is in fluxnet.card, so this should typically take precedence. 
     28 
     29Before we get to some specifics, let's create the jobs. 
     30 
     31{{{ 
     32cd config/ORCHIDEE_OL/ENSEMBLE 
    1633vi config.card 
    1734}}} 
    18 Change the following lines 
     35 
     36Change the following lines (on obelix...on Irene, the ARCHIVE line should be fine): 
     37 
    1938{{{ 
    2039JobName=FLUXNET 
    21   ARCHIVE=/home/scratch01/mmcgrath 
     40  ARCHIVE=/home/scratch01/$LOGIN 
    2241}}} 
     42 
    2343then create the job scripts 
     44 
    2445{{{ 
    2546../../../libIGCM/ins_job 
    2647}}} 
    27 this creates Job\_FLUXNET.  Notice that this job will pull from the SPINUP directory as well.  ins\_job used to create Job files in every directory, but that functionally changed a while ago.  Therefore, the following is now necessary (OOL\_SEC\_STO because we will run a job with sechiba and stomate). 
     48 
     49this creates Job_FLUXNET.  Notice that this job will pull from the SPINUP directory as well.  ins_job used to create Job files in every directory, but that functionally changed a while ago.  Therefore, the following is now necessary (OOL_SEC_STO because we will run a job with sechiba and stomate). 
     50 
    2851{{{ 
    2952cd ../SPINUP 
     
    3356cd ../../../ENSEMBLE 
    3457}}} 
    35 Now modify the run directory. 
     58 
     59Now edit the Job file.  Notice that this is the Job file that is copied to all the subjobs when they run, so if you want them to run on a different queue (I use the long queue on obelix, as 500 years can take more than 12 hours), you should do that here.  I also modify the run directory so I know where the jobs are running and can go to that directory easily if needed. 
     60 
    3661{{{ 
    3762vi Job_FLUXNET 
    3863(change RUN_DIR_PATH=/home/scratch01/mmcgrath/RUN_DIR) 
     64(change JobType=DEV if you are not sure this will work) 
    3965mkdir /home/scratch01/mmcgrath/RUN_DIR 
    4066}}} 
    41 In addition, you may sometimes have to change the queue name in this file (I use medium on obelix, but sometimes long is required as the job won't finish). 
    4267 
    4368Now change the options for the sites to run against. 
     69 
    4470{{{ 
    4571vi fluxnet.card 
    4672}}} 
    47 Need to change the number of PFTs, which sites we are running against (do a small testcase with a single site first), and the PFT characteristics of that site. 
     73 
     74Best to run a small test with a single site.  If you are running with age classes (not recommended) or any number of PFTs other than the standard 13 in ORCHIDEE, you will need to change the following: 
     75 
    4876{{{ 
    49   NbPFTs= 37 
     77  NbPFTs= 13 
    5078  Groups= ( TEST ) 
    51   TEST =           ( BR-Sa3 , BR-Sa3_2000-2003.nc , 2000 , 4 , 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 )  
    52  
    53   n_iter=1 
    54   duree_sechiba=500 
    55   duree_stomate=0 
    56   duree_carbonsol=0 
    57   duree_final=1 
     79  TEST =           ( BR-Sa3 , BR-Sa3_2000-2003.nc , 2000 , 4 , 0,1,0,0,0,0,0,0,0,0,0,0,0 )  
    5880}}} 
    5981 
    60 For some reason, in SPINUP/SUBJOB/OOL\_SEC\_STO/ reftemp.nc is copied to the run directory in both sechiba.card and stomate.card; this results in a crash.  To fix: 
     82If you have 13 PFTs, you can add the above lines just as they are.  COMMENT OUT ANY OTHER GROUPS LINES.  Else, when you submit the job, you will launch a run over all of the sites in groups, and you have to cancel them one at a time. 
     83 
     84The length of the spinup also matters.  I use the following for the moment (in fluxnet.card, also in SPINUP/spinup.card) 
     85 
    6186{{{ 
    62    vi ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/sechiba.card 
    63 }}} 
    64 and remove the line 
    65 {{{ 
    66             (${R_IN}/SRF/reftemp.nc, .), \ 
     87n_iter=1 
     88duree_inistomate=1 
     89duree_sechiba=500 
     90duree_final=1 
    6791}}} 
    6892 
    69 Some things to watch out for with ORCHIDEE-CN-CAN: best to use a run.def with no age classes (for easier comparison) and no forest management. 
     93All of the other duree values I set to 0.  This launches a simulation over one loop of the forcing file, then 500 years (regardless of the length of the forcing file), and then one final loop for analysis. 
    7094 
    71 It seems the scripts expect somethings in sechiba.card, as well.  I had to add the following lines to SPINUP/SUBJOB/OOL_SEC_STO/COMP/sechiba.card, under the UserChoices section: 
     95The following directories are used in the runs (from what I can tell): 
    7296 
    7397{{{ 
    74 ROUTING=n 
    75 NEWHYDROL=y 
    76 LAIMAP=n 
    77 IMPOSE_VEG=n 
    78 LAND_USE=n 
    79 OKCO2=y 
    80 CO2varying=n 
     98ENSEMBLE/PARAM/ 
     99SPINUP/COMP/ 
     100SPINUP/SUBJOBS/OOL_SEC_STO/COMP/ 
    81101}}} 
    82102 
    83 And the following section: 
     103Therefore, we need to copy the CN-CAN run.def that we want to use (strongly advise 13 MTC with no age classes) to one of these directories.  XXXXXX is the run.def file from whatever configuration directory you have that is currently working.  Note that you also need to copy the COMP directory of one of the working CN-CAN directories (e.g., SPINUP_ANALYTIC_FG1, OOL_SEC_STO_FG1trans,OOL_SEC_STO_FG2to) to SPINUP/SUBJOBS/OOL_SEC_STO/COMP). 
     104 
    84105{{{ 
    85 [Post_1M_sechiba_history] 
    86 Patches = () 
    87 GatherWithInternal= (lon, lat, veget, time_counter, time_counter_bnds, Areas, Contfrac) 
    88 TimeSeriesVars2D = (nobiofrac, alb_nir, alb_vis, bqsb, evap, fluxlat, fluxsens, gqsb, netrad, qair, rain, runoff, snow, snownobio, snowf, subli, tair, temp_sol, tsol_max, tsol_min, drainage,mrsos, mrso, mrros, mrro, prveg, evspsblveg, evspsblsoi, tran, treeFrac, grassFrac, cropFrac, baresoilFrac, residualFrac) 
    89 TimeSeriesVars3D = (lai, maxvegetfrac, vegetfrac, ptn, nee) 
     106   cp ../OOL_SEC_STO_FG2/PARAM/run.def ../ENSEMBLE/PARAM/   (for the run.def...this one is not 13 MTCs, though) 
     107   cp ../OOL_SEC_STO_FG2/COMP/* ../SPINUP/SUBJOBS/OOL_SEC_STO/COMP/ 
    90108}}} 
    91109 
    92 And something similar in SPINUP/SUBJOB/OOL_SEC_STO/COMP/stomate.card 
    93 {{{ 
    94 [Post_1M_stomate_history] 
    95 Patches= () 
    96 GatherWithInternal= (lon, lat, PFT, time_counter, Areas) 
    97 TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,HARVEST_ABOVE) 
    98 ChunckJob2D = NONE 
    99 TimeSeriesVars3D= (CO2FLUX,LAI,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,ADAPTATION,REGENERATION) 
    100 }}} 
    101  
    102 It seems the scripts expect somethings in orchidee_ol.card, as well.  I had to add the following lines to SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card, under the UserChoices section: 
     110We need to make sure all of the following lines are commented out (or do not exist in the run.def), since the script will change the vegetation for each site by adding lines at the end of the run.def and if these lines are present they will override them: 
    103111 
    104112{{{ 
    105 XIOS=n 
    106 NORESTART=n 
    107 TIMELENGTH=y 
    108 }}} 
    109  
    110 Since we are not using XIOS, I removed the following in  
    111  
    112 {{{ 
    113         (${SUBMIT_DIR}/PARAM/iodef.xml, .)   ,\ 
    114 }}} 
    115  
    116 It seems that AUTO values are not being removed in the run.def during processing.  I set XIOS\_ORCHIDEE\_OK=__AUTO__, DRIVER\_reset\_time=y, taking values from a previous successful run I did (looking in the RUN\_DIR).  I only replaced a value when the code crashed with a complaint. 
    117  
    118 I removed the following lines from ENSEMBLE/PARAM/run.def, since those variables didn't appear anywhere in the working config directories for the TRUNK.   
    119  
    120 {{{ 
    121 TIME_LENGTH = _AUTO_ 
    122 TIME_SKIP = _AUTO_ 
    123 SECHIBA_HISTFILE2=_AUTO_ 
    124 WRITE_STEP=_AUTO_ 
    125 STOMATE_HIST_DT=_AUTO_ 
    126 STOMATE_IPCC_HIST_DT=_AUTO_ 
    127 ATM_CO2 =_AUTO_: DEFAULT = 350. 
    128 STOMATE_CFORCING_NAME= _AUTO_ : DEFAULT = NONE 
    129 }}} 
    130  
    131 The following needs to be set to AUTO, else we get complaints when libIGCM tries to set them. 
    132 {{{ 
    133 STOMATE_RESTART_FILEIN=__AUTO__ 
    134 STOMATE_OK_STOMATE=__AUTO__ 
    135 SECHIBA_restart_in=__AUTO__ 
    136 XIOS_ORCHIDEE_OK=__AUTO__ 
    137 RESTART_FILEIN=__AUTO__ 
    138 }}} 
    139  
    140 We need to make sure all of the following lines are commented out (or do not exist in the run.def, since the script will change the vegetation for each site by adding lines at the end of the run.def and if these lines are present they will override them: 
    141  
    142 {{{ 
    143 IMPOSE_VEG=y 
    144113SECHIBA_VEG__01=0.0769230769231 
    145114... 
     
    148117}}} 
    149118 
    150 Make sure no limits are specified, either (i.e., remove lines like the following): 
     119Make sure the following line is in the run.def. 
     120 
    151121{{{ 
    152 LIMIT_WEST=4 
    153 LIMIT_EAST=6 
    154 LIMIT_NORTH=48 
    155 LIMIT_SOUTH=46 
     122IMPOSE_VEG=y 
    156123}}} 
    157124 
    158 Now we need to copy the CAN-CN run.def that we want to use.  XXXXXX is the run.def file from whatever configuration directory you have that is currently working. 
     125Also confirm that IMPOSE_VEG is not set in another of the files above. 
     126 
     127The scripts expect some variables in SPINUP/SUBJOBS/OOL_SEC_STO/COMP/sechiba.card, and will crash if you don't have them.  It tries to change them (perhaps based on fluxnet.card) and gives up if it doesn't find them in sechiba.card to change. 
     128 
    159129{{{ 
    160    cp XXXXXX ../SPINUP/SUBJOB/OOL_SEC_STO/PARAM/ 
    161    cp XXXXXX ../ENSEMBLE/PARAM/ 
     130[UserChoices] 
     131NEWHYDROL=y 
     132ROUTING=n 
     133LAIMAP=n 
     134IMPOSE_VEG=y 
     135LAND_USE=n 
     136OKCO2=y 
     137CO2varying=n 
    162138}}} 
    163139 
    164 For ORCHIDEE-CN-CAN, I checked the differences between the sechiba.card in our working configuration directory and that in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP.  I had to change the following in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP/sechiba.card 
     140Something similar in SPINUP/SUBJOBS/OOL_SEC_STO/COMP/orchidee_ol.card 
    165141{{{ 
    166 [InitialStateFiles] 
    167 List=       (${R_IN}/SRF/routing.nc, .), \ 
    168             (${R_IN}/SRF/cartepente2d_15min.nc, .), \ 
    169             (${R_IN}/SRF/floodplains.nc, .), \ 
    170             (${R_IN}/SRF/albedo/alb_bg_modisopt_2D.nc, alb_bg.nc), \ 
    171             (${R_IN}/SRF/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_2000.nc, PFTmap.nc) 
     142[UserChoices] 
     143NORESTART=n 
     144TIMELENGTH=y 
    172145}}} 
    173146 
    174 in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP/stomate.card, I made the following change: 
     147If we turn off XIOS, we have a couple variables undeclared in IOIPSL, so it crashes.  Instead, let's leave XIOS on and include the following hack for it to find the iodef.xml file.  Note that you will have to change this path!   
    175148{{{ 
    176 [BoundaryFiles] 
    177 List=   () 
    178 ListNonDel= (${R_IN}/SRF/reftemp.nc, .), \ 
    179             (/home/orchidee04/aslanso/Files/soils_param.nc, soils_param.nc), \ 
    180             (${R_IN}/SRF/soils_param_usdatop.nc, soils_param_usda.nc) 
     149        (/home/orchidee03/mmcgrath/MYFOLDER/config/ORCHIDEE_OL/SPINUP_ANALYTIC_FG1/PARAM/iodef.xml, .)   ,\ 
    181150}}} 
    182151 
    183 With my debug flags on, the code threw a runtime error on the following line for an unknown reason, so I just commented it out (it's a debugging write statement, and I had l\_dbg activated...no harm in removing for the moment). 
     152And change the following "blocker" to "nonblocker" in SPINUP/SUBJOBS/OOL_SEC_STO/COMP/sechiba.driver, since we want to let fluxnet.card control options (since it makes choices of which directories to copy based on the contents of fluxnet.card, not the contents of run.def). 
    184153{{{ 
    185 modeles/IOIPSL/src/calendar.f90 
    186  
    187     IF (l_dbg) THEN 
    188 !      WRITE(ipslout,*) "isittime 2.0 ", & 
    189 ! &     date_next_check,date_next_act,ABS(dt_action-freq), & 
    190 ! &     ABS(dt_action+dt_check-freq),dt_action,dt_check, & 
    191 ! &     next_check_itau,do_action 
    192     ENDIF 
     154        IGCM_comp_modifyDefFile blocker run.def STOMATE_OK_STOMATE y 
     155        IGCM_comp_modifyDefFile blocker run.def STOMATE_OK_STOMATE n 
    193156}}} 
    194  
    195 out\_orchidee has become huge, seemingly because of histfile debugging output.  So I am turning off ioipsl\_debug in modeles/IOIPSL/src/errioipsl.f90. 
    196  
    197 I often set the JobType=DEV in my Job file so that it will overwrite old output files in the archive.  Else, you have to delete the IGCM\_OUT/OL2/PROD/ensemble/ files for every site before every run.  Which is no problem if everything works, but it is annoying if you are not yet sure they will work. 
    198157 
    199158Launch the job (from the README file). 
     
    203162}}} 
    204163 
    205 This submits jobs to the queue which create new directories in the ENSEMBLE directory, each one having the name of the test site. 
     164BE SURE TO CHECK THE USED RUN.DEFs.  These can be found by changing to the RUN_DIR when the job is running.  The scripts will add flags to the end of the run.def, and sometimes these may conflict with what you want to run. 
    206165 
    207 After the trunk merged with CN, I got very quick crashes along the lines of: 
    208  
    209 {{{ 
    210 ERROR : parameter Nfert_cropland_FILE doesn't exist in run parameter file ! 
    211 You must correct subjobparam option in your card file or add new parameter in run.def file 
    212 We must STOP here. 
    213 }}} 
    214 For a variety of variables.  Every time this happened, I removed the variable from fluxnet.card and relaunched. 
    215  
    216  
    217  
    218  
    219  
    220  
    221