Changes between Version 17 and Version 18 of Documentation/UserGuide/FLUXNETValidation
- Timestamp:
- 2019-12-20T11:44:54+01:00 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/FLUXNETValidation
v17 v18 17 17 18 18 The general procedure is that the Job_ENSEMBLE script will create and launch the following runs for every site: 19 STOI (a fast spinup, length controlled by duree_inistomate)20 ORC-1 (a longer spinup, length controlled by duree_sechiba)21 CLEARCUT (added for CAN...aboveground biomass is removed before the run, to ensure forests have a specific age at the end...length controlled by the fifth field in the site description in fluxnet.card)22 FIN (the final fast production run, length controlled by duree_final)19 * STOI (a fast spinup, length controlled by duree_inistomate) 20 * ORC-1 (a longer spinup, length controlled by duree_sechiba) 21 * CLEARCUT (added for CAN...aboveground biomass is removed before the run, to ensure forests have a specific age at the end...length controlled by the fifth field in the site description in fluxnet.card) 22 * FIN (the final fast production run, length controlled by duree_final) 23 23 24 24 The length of these phases can be modified, and additional longer spinups can be added (by changing n_iter, creating ORC-2, ORC-3, etc.), but they are typically not necessary. The final production data (from FIN) is always saved, and output from the other stages can be saved as well, but it's not recommended. In particular, the data for the ORC run can get pretty large when half-hourly output is used. 25 25 26 I have found the following files are used. A lot of the work below goes to ensure that conflicting options are not specified in these files (assuming you are running analytical spinup, sechiba, and stomate):26 I have found the following files are used. A lot of the work below goes to ensure that conflicting options are not specified in these files. OOL_SEC_STO is selected when you are run both stomate and sechiba active (otherwise, OOL_SEC may be used): 27 27 28 28 {{{ … … 40 40 41 41 The following gives a general flow of how the script works, which should give an idea of the priority. 42 1) ENSEMBLE_initialize/ensemble.ksh reads in the options from fluxnet.card (launching the script as "./Job_ENSEMBLE fluxnet" copies fluxnet.card to ensemble.card...Job_ENSEMBLE always reads all options from ensemble.card). These are global variables while the runs are being set-up. But, when the individual runs (each stage/site) launch, they may get overwritten by PARAM and COMP options in the launch directory. 42 1) ENSEMBLE_initialize/ensemble.ksh reads in the options from fluxnet.card (launching the script as "./Job_ENSEMBLE fluxnet" copies fluxnet.card to ensemble.card...Job_ENSEMBLE always reads all options from ensemble.card). These are global variables while the runs are being set-up. But, when the individual runs (each stage/site) launch, they may get overwritten by PARAM and COMP options in the launch directory. The following sections are parsed in fluxnet.card: 43 43 a) Section [SPINUP] 44 44 b) Section [UserChoices] 45 45 c) Section [CONFIG] (explicitly looks for ForcingPath, NbPFTs, NbSitesParam, NameSitesParam, Groups) 46 46 47 The script below creates multiple new submission directories. I use the notation ${}/PARAM/run.def and ${}/COMP/*card to refer to the run.def and various .card files **after** they have been copied from their original locations.47 The JOB_ENSEMBLE script and the spinup.driver create multiple new submission directories, using the SPINUP and SPINUP/SUBJOBS directories as templates. I use the notation ${}/PARAM/run.def and ${}/COMP/*card to refer to the run.def and various .card files **after** they have been copied from their original locations. 48 48 49 49 The following is then done for every site in Groups in fluxnet.card: … … 52 52 4) the Job_ file for the spinup is modified 53 53 5) The FLUXNET/PARAM/run.def is copied to the spinup directory ${}/PARAM/run.def 54 6) The script checks that all options which appear in fluxnet.card /SubJobParamsalso appear in FLUXNET/PARAM/run.def54 6) The script checks that all options which appear in fluxnet.card[SubJobParams] also appear in FLUXNET/PARAM/run.def 55 55 7) The script writes all of these options into the ${}/COMP/spinup.card and ${}/PARAM/run.def 56 56 8) The script checks to make sure that the NbSitesParam variables in the fluxnet.card appear in the ${}/PARAM/run.def … … 58 58 10) The spinup job is launched 59 59 60 From here, the Job_ENSEMBLE script is not used anymore. Now the independent spinup jobs control the show. Things are a little more difficult to follow here unless you are really used to libIGCM. libIGCM does a very good job of generalizing functions, but that can make it more difficult to find what you are looking for. It helps to remember that each file name i s COMPis a "component", and libIGCM treats them all identically: initilizing with IGCM_comp_Initialize, for example. As defined in SPINUP/config.card, we only have a single component in a spinup job: SPIN.61 62 A spinup job runs like the following. Notice that all of this is carried out in ${}, which is a new directory the above script has created in the FLUXNET directory ( something likeFI_HyyFLUXNET), NOT in the SPINUP directory.60 From here, the Job_ENSEMBLE script is not used anymore. Now the independent spinup jobs control the show. Things are a little more difficult to follow here unless you are really used to libIGCM. libIGCM does a very good job of generalizing functions, but that can make it more difficult to find what you are looking for. It helps to remember that each file name in the COMP directory is a "component", and libIGCM treats them all identically: initilizing with IGCM_comp_Initialize, for example. As defined in SPINUP/config.card, we only have a single component in a spinup job: SPIN. 61 62 A spinup job runs like the following. Notice that all of this is carried out in ${}, which is a new directory the above script has created in the FLUXNET directory (e.g., FLUXNET/FI_HyyFLUXNET), NOT in the SPINUP directory. 63 63 11) IGCM_comp_Initialize/libIGCM_comp.ksh reads in the UserChoices from ${}/COMP/spinup.card, which was created in step (2) above and modified in steps (3) and (7) 64 64 12) IGCM_comp_Update/libIGCM_comp.ksh calls SPIN_Update from ${}/COMP/spinup.driver, which determines we are on the "start" stage and therefore need to follow STOI instructions for the next step (referred to as SECSTOINI inside spinup.driver) … … 73 73 74 74 == Practical steps == 75 This section gives step-by-step instructions for getting the simulations working with a clean svn install of ORCHIDEE-CAN r6 378. The "General steps" section gives an idea of how to figure things out yourself.76 77 First, duplicate the ENSEMBLE directory to a name of your own choosing (I choose the name FLUXNET here ).75 This section gives step-by-step instructions for getting the simulations working with a clean svn install of ORCHIDEE-CAN r6414. The "General steps" section gives an idea of how to figure things out yourself. 76 77 First, duplicate the ENSEMBLE directory to a name of your own choosing (I choose the name FLUXNET here, to match the previous section). 78 78 79 79 {{{ 80 80 cd config/ORCHIDEE_OL 81 81 cp -r ENSEMBLE FLUXNET 82 cd FLUXNET 82 83 }}} 83 84 … … 103 104 }}} 104 105 105 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. 106 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. I will point out the exact changes I make for r6414 below. 106 107 107 108 Before we get to some specifics, let's create the jobs. … … 139 140 {{{ 140 141 vi Job_FLUXNET 142 (make the queue "medium" instead of "mediump" on obelix: #PBS -q mediump) 141 143 (change RUN_DIR_PATH=/home/scratch01/mmcgrath/RUN_DIR) 142 144 (change JobType=DEV if you are not sure this will work) … … 160 162 }}} 161 163 162 COMMENT OUT ANY OTHER GROUPS LINES. Else, when you submit the job, you will launch a run over all of the sites in all groups, and you have to cancel them one at a time.163 164 The length of the spinup also matters. I use the following for the moment (in fluxnet.card, also in SPINUP/spinup.card)164 COMMENT OUT ANY OTHER LINES THAT BEGIN WITH "Groups". Else, when you submit the job, you will launch a run over all of the sites in all groups, and you have to cancel them one at a time. From experience, this is painful. 165 166 The length of the spinup also matters. I use the following for production runs at the moment (in fluxnet.card...I also change the values in SPINUP/COMP/spinup.card, even though those should be overwritten by Job_FLUXNET) 165 167 166 168 {{{ … … 173 175 (I use duree_sechiba=50 for my test run, so that it goes a little faster). 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. 174 176 175 The section in the fluxnet.card with [SubJobParams] deserves special mention. As of a recent version of CAN, the run.def has been restructured to include two files: orchidee.def, orchidee_pft.def. This makes the run.def much neater and matches what is done in the coupled simulations. However, the Job_ENSEMBLE script attempts to change some variables in the run.def that fall under the [SubJobParams] section. To do this, it looks at the actual run.def file, not any included file. If it does not find a line in the run.def corresponding to the lines in [SubJobParams], it will crash. So make sure all the lines you specif icunder [SubJobParams] in fluxnet.card also explicitly appear in the PARAM/run.def file.177 The section in the fluxnet.card with [SubJobParams] deserves special mention. As of a recent version of CAN, the run.def has been restructured to include two files: orchidee.def, orchidee_pft.def. This makes the run.def much neater and matches what is done in the coupled simulations. However, the Job_ENSEMBLE script attempts to change some variables in the run.def that fall under the [SubJobParams] section. To do this, it looks at the actual run.def file, not any included file. If it does not find a line in the run.def corresponding to the lines in [SubJobParams], it will crash. So make sure all the lines you specify under [SubJobParams] in fluxnet.card also explicitly appear in the PARAM/run.def file. 176 178 177 179 {{{ … … 218 220 NINPUT_SUFFIX_YEAR = n 219 221 220 ( remove the following lines, otherwise ORCHIDEE will not find a land point for any site outside of this window)222 (make sure the following lines are commented out, otherwise ORCHIDEE will not find a land point for any site outside of this window) 221 223 LIMIT_WEST=8 222 224 LIMIT_NORTH=48 … … 226 228 }}} 227 229 228 Note that many of the Nitrogen variables above were also in orchidee.def! Remove them there. Also remove ATM_CO2 that was already existing in the run.def. 230 Note that many of the Nitrogen variables above were also in PARAM/orchidee.def! Remove the following from PARAM/orchidee.def: 231 232 {{{ 233 Nammonium_FILE = ndep_nhx.nc 234 Nammonium_VAR = nhx 235 236 Nnitrate_FILE = ndep_noy.nc 237 Nnitrate_VAR = noy 238 239 Nfert_FILE = NONE 240 Nfert_VAR = nfer 241 242 Nmanure_FILE = NONE 243 Nmanure_VAR = Nmanure 244 245 Nfert_cropland_FILE = nfert_cropland.nc 246 Nfert_cropland_VAR = nfer 247 248 Nmanure_cropland_FILE = nmanure_cropland.nc 249 Nmanure_cropland_VAR = Nmanure 250 251 Nfert_pasture_FILE = nfert_pasture.nc 252 Nfert_pasture_VAR = Nfer 253 254 Nmanure_pasture_FILE = nmanure_pasture.nc 255 Nmanure_pasture_VAR = Nmanure 256 257 Nbnf_FILE= bnf.nc 258 Nbnf_VAR= BNF_MGN_PERM2_PERYR 259 }}} 260 261 Also remove the ATM_CO2 that was already existing in the PARAM/run.def: 262 {{{ 263 ATM_CO2 = _AUTO_: DEFAULT = 350. 264 }}} 229 265 230 266 The addition of the orchidee.def and orchidee_pft.def required adding them to the [ParametersFiles] in SPINUP/SUBJOBS/OOL_SEC_STO/COMP/orchidee_ol.card, so that libIGCM copies the new files to the PARAM directory of the running code. It also required changes to the driver, to select from the correct orchidee_pft.def file. To fix this, I simply copied OOL_SEC_STO_FG2/COMP/orchidee_ol.* to SPINUP/SUBJOB/OOL_SEC_STO/COMP/. … … 233 269 cp ../OOL_SEC_STO_FG2/COMP/orchidee_ol.* ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/ 234 270 }}} 235 This also required adding the following to the [UserChoices] section in SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card 271 This also required adding the following to the [UserChoices] section in SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card, since the SPINUP/COMP/spinup.driver looks for them: 236 272 237 273 {{{ … … 241 277 TIMELENGTH=y 242 278 }}} 279 280 Notice that the SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card defines the age classes and PFTs that you will be using. For the moment, we have selected our fluxnet.card to have a certain number of PFTs and age classes, but we have **not** conveyed this choice to libIGCM in any way. We do that by changing the SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card value of DefSuffix: 281 {{{ 282 vi ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card 283 DefSuffix = 28pft.1ac 284 }}} 285 Make sure this matches with the fluxnet.card that you copied at the beginning! 243 286 244 287 The script expects any variables in the NameSitesParam keyword of fluxnet.card to be present in PARAM/run.def. SECHIBA_VEGMAX is currently in PARAM/orchidee_pft.def_*. So, depending on what you have present in SPINUP/SUBJOB/OOL_SEC_STO/COMP/orchidee_ol.card for DefSuffix, you need to move the following lines to PARAM/run.def from PARAM/orchidee_pft.def_DefSuffix, removing the lines in PARAM/orchidee_pft.def_DefSuffix. The the specific case of 28 PFTs that we are using here: … … 277 320 SECHIBA_VEGMAX__28=0.0357142857143 278 321 322 cp PARAM/*def ../SPINUP/SUBJOB/OOL_SEC_STO/PARAM/ 279 323 }}} 280 324