Changes between Version 8 and Version 9 of Documentation/UserGuide/FLUXNETValidation
- Timestamp:
- 2018-12-20T14:18:46+01:00 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/FLUXNETValidation
v8 v9 1 This was tested for ORCHIDEE-CN-CAN (r5678 of ORCHIDEE and r5673 of ORCHIDEE_OL) on obelix. 2 1 3 First, look at Nicolas's page. 2 4 … … 5 7 And then look at the README file in config/ORCHIDEE_OL/ENSEMBLE. 6 8 7 Now, if you are using ORCHIDEE-CN-CAN, you need to do some other things. I am running on Obelix.9 Be sure you have checked out both CN-CAN modeles/ORCHIDEE and config/ORCHIDEE_OL (Documentation/UserGuide/ORCHIDEEDOFOCOInstall). 8 10 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/.11 Be 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. 10 12 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. 13 Start 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 15 I 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): 13 16 14 17 {{{ 15 cd ~/ORCHIDEE-CN-CAN/config/ORCHIDEE_OL/ENSEMBLE 18 ENSEMBLE/fluxnet.card 19 ENSEMBLE/PARAM/run.def 20 SPINUP/COMP/spinup.card 21 SPINUP/SUBJOBS/OOL_SEC_STO/COMP/sechiba.card 22 SPINUP/SUBJOBS/OOL_SEC_STO/COMP/stomate.card 23 }}} 24 25 I 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 27 I 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 29 Before we get to some specifics, let's create the jobs. 30 31 {{{ 32 cd config/ORCHIDEE_OL/ENSEMBLE 16 33 vi config.card 17 34 }}} 18 Change the following lines 35 36 Change the following lines (on obelix...on Irene, the ARCHIVE line should be fine): 37 19 38 {{{ 20 39 JobName=FLUXNET 21 ARCHIVE=/home/scratch01/ mmcgrath40 ARCHIVE=/home/scratch01/$LOGIN 22 41 }}} 42 23 43 then create the job scripts 44 24 45 {{{ 25 46 ../../../libIGCM/ins_job 26 47 }}} 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 49 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). 50 28 51 {{{ 29 52 cd ../SPINUP … … 33 56 cd ../../../ENSEMBLE 34 57 }}} 35 Now modify the run directory. 58 59 Now 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 36 61 {{{ 37 62 vi Job_FLUXNET 38 63 (change RUN_DIR_PATH=/home/scratch01/mmcgrath/RUN_DIR) 64 (change JobType=DEV if you are not sure this will work) 39 65 mkdir /home/scratch01/mmcgrath/RUN_DIR 40 66 }}} 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).42 67 43 68 Now change the options for the sites to run against. 69 44 70 {{{ 45 71 vi fluxnet.card 46 72 }}} 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 74 Best 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 48 76 {{{ 49 NbPFTs= 3777 NbPFTs= 13 50 78 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 ) 58 80 }}} 59 81 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: 82 If 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 84 The length of the spinup also matters. I use the following for the moment (in fluxnet.card, also in SPINUP/spinup.card) 85 61 86 {{{ 62 vi ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/sechiba.card 63 }}} 64 and remove the line 65 {{{ 66 (${R_IN}/SRF/reftemp.nc, .), \ 87 n_iter=1 88 duree_inistomate=1 89 duree_sechiba=500 90 duree_final=1 67 91 }}} 68 92 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.93 All 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. 70 94 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:95 The following directories are used in the runs (from what I can tell): 72 96 73 97 {{{ 74 ROUTING=n 75 NEWHYDROL=y 76 LAIMAP=n 77 IMPOSE_VEG=n 78 LAND_USE=n 79 OKCO2=y 80 CO2varying=n 98 ENSEMBLE/PARAM/ 99 SPINUP/COMP/ 100 SPINUP/SUBJOBS/OOL_SEC_STO/COMP/ 81 101 }}} 82 102 83 And the following section: 103 Therefore, 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 84 105 {{{ 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/ 90 108 }}} 91 109 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: 110 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: 103 111 104 112 {{{ 105 XIOS=n106 NORESTART=n107 TIMELENGTH=y108 }}}109 110 Since we are not using XIOS, I removed the following in111 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 = NONE129 }}}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=y144 113 SECHIBA_VEG__01=0.0769230769231 145 114 ... … … 148 117 }}} 149 118 150 Make sure no limits are specified, either (i.e., remove lines like the following): 119 Make sure the following line is in the run.def. 120 151 121 {{{ 152 LIMIT_WEST=4 153 LIMIT_EAST=6 154 LIMIT_NORTH=48 155 LIMIT_SOUTH=46 122 IMPOSE_VEG=y 156 123 }}} 157 124 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. 125 Also confirm that IMPOSE_VEG is not set in another of the files above. 126 127 The 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 159 129 {{{ 160 cp XXXXXX ../SPINUP/SUBJOB/OOL_SEC_STO/PARAM/ 161 cp XXXXXX ../ENSEMBLE/PARAM/ 130 [UserChoices] 131 NEWHYDROL=y 132 ROUTING=n 133 LAIMAP=n 134 IMPOSE_VEG=y 135 LAND_USE=n 136 OKCO2=y 137 CO2varying=n 162 138 }}} 163 139 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.card140 Something similar in SPINUP/SUBJOBS/OOL_SEC_STO/COMP/orchidee_ol.card 165 141 {{{ 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] 143 NORESTART=n 144 TIMELENGTH=y 172 145 }}} 173 146 174 in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP/stomate.card, I made the following change: 147 If 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! 175 148 {{{ 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, .) ,\ 181 150 }}} 182 151 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).152 And 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). 184 153 {{{ 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 193 156 }}} 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.198 157 199 158 Launch the job (from the README file). … … 203 162 }}} 204 163 205 This submits jobs to the queue which create new directories in the ENSEMBLE directory, each one having the name of the test site.164 BE 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. 206 165 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 file212 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