-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul of FATES history variable outputs #802
Conversation
…nform with CF conventions
I will note that there is a potential issue that may or may not need to get solved. Currently, we need to set the individual This is because here we sum up all of these values using the actual |
|
||
model_day_int = nint(hlm_model_day) | ||
siteloop: do s = 1,nsites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
ivar=0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrifoster , could we add in the suffix key at the top here, so future authors have a quick reference on how to name output variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, great idea. I will do that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Only one suggestion, that is to add in the suffix key at the top of the output definition section so future authors have a guide to naming new variables.
Standardized FATES history variable names, units, and changed the flushing logic.
Description:
This is a set of changes intended to make the history output more clear to users (new and otherwise), with standardized units and unit descriptions in the metadata, standardized naming conventions for how the variables are indexed, and more verbose long names. This also updates how we treat non-FATES columns in the upscaling to the grid-cell level output. This resolves #630 and #535
This PR has an associated ctsm pull request: ESCOMP/CTSM#1542
Suffixes:
_AC: cohort/plant age
_AP: patch/disturbance age
_CL: canopy layer
_DC: coarse woody debris size
_LL: leaf layer
_EL: element
_FC: fuel class
_HT: height
_PF: PFT
_SL: soil layer
_SZ: size
Variables can be indexed by multiple variables (e.g. _SZPF). Variables that don't have one of these suffixes are only site-level. See the attached csv file to see a table of the old name and new name for each variable (note that some have been deleted - see the notes column)
As per a recent (09/16/21) FATES call, we decided to standardize all units such that most align with the units in the CF table. The description of the units in the metadata has also been standardized as per CF conventions (e.g. 'kg m-2 s-1').
Note that we no longer denote carbon (or another element) in the units for biomass (or other similar) variables, but the long name has been updated to make it clear that the mass is in kg of carbon. Note that for per area cohort/population density the units description is "m-2".
Major Units Changes
See the attached csv to see the old units, the new units, and what the factor difference should be between them. Also see Charlie's notes from the meeting here.
General clean-up - some typos/inaccuracies in the metadata and mistakes in the code were fixed.
Flushing logic. We now flush all variables on the FATES side to zero, whereas all variables on the host land model side are flushed to the ignore value.
FATES_historyvar_changes.csv
Collaborators:
Discussions with @rgknox , @ckoven, @glemieux, @rosiealice, @jkshuman, @billsacks
Expectation of Answer Changes:
These should not change the answers per se, but will result in factor differences between this update and master because of the units changes. See the attached csv for the expected factor differences. I have done testing to determine that where we do get differences, they are the expected differences based on the units change.
Checklist:
Test Results:
CTSM (or) E3SM (specify which) test hash-tag: ctsm5.1.dev061-10-gddaa7017
CTSM (or) E3SM (specify which) baseline hash-tag: ctsm5.1.dev061
FATES baseline hash-tag: sci.1.49.0_api.17.0.0-48-g8777a62a
Test Output:
Almost all failed tests on Izumi (aux_clm) and Cheyenne (aux_clm and fates) are only for NLCOMP (namelist changes - which we expected) and FIELDLIST diffs (which we also expected since the FATES history variables changed names).
There was a DIFF FAIL for SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.cheyenne_intel.clm-FatesColdDefHydro in aux_clm on Cheyenne and ERS_D_Ld5.1x1_brazil.I2000Clm50FatesCruRsGs.cheyenne_intel.clm-FatesColdDefHydro and SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.cheyenne_intel.clm-FatesColdDefHydro in fates, but this was because of diffs for
FATES_SOILMATPOT_SL
andFATES_ROOTUPTAKE_SL
, which changed units (variable names did not change), so this was expected.DIFF Fail on Izumi for FAIL SMS_D_Vnuopc_Mmpi-serial.CLM_USRDAT.I1PtClm51Bgc.izumi_nag.clm-default--clm-NEON-NIWO, I discussed this with @billsacks, @ekluzek, and @wwieder and it seems to be a problem with the baseline itself and the fact that the NEON datasets sometimes change.
In general, I also tested output to ensure that when answers did change, they changed in the correct way (i.e. by the expected factor difference). Some variables changed because we fixed mistakes in the code:
site_hydr%sapflow_scpf
was getting set tohio_rootuptake_si
, which also overwrote thehio_rootuptake_si
. This was updated so that sapflow was set tohio_sapflow_si
@JoshuaRady found a bug in that
this%hvars(ih_fines_bg_elem)%r82d
andthis%hvars(ih_fines_ag_elem)%r82d
were switched in the associate statement. This has also been fixed.A few other differences are seemingly from the flushval changes:
NPP_LEAF_CANOPY_SCLS
/FATES_LEAF_ALLOC_CANOPY_SZ
- in master output this value is -1000 for much of the first few time stepsCEFFLUX
/FATES_CEFFLUX
- off by a factor of ~0.98, unclear where this exactly comes fromCEFFLUX_SCPF
/FATES_CEFFLUX_SZPF
- also off but ~0.99SITE_MEANLIQVOL_DROUGHTPHEN
/FATES_MEANLIQVOL_DROUGHTPHEN
- off by ~0.996, seemingly from flushval update