-
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
Refactor and fix per-age-class history outputs #1225
Conversation
FATES_PATCHAREA_LU and FATES_PATCHAREA_AP are not in units of m2, but rather m2/m2. It is thus misleading for them to be named "AREA". In the interest of not messing up user workflows, I'm not changing those---at least for now. However, this commit renames related internal variables in the history code for clarity. Specifically, "area" is replaced with "fracarea" (fractional area, relative to site area) in the following: - ih_area_si_landuse - ih_area_si_age - hio_area_si_landuse - hio_fracarea_si_age
1) Makes it clearer that this is a patch-level variable. 2) Uses "fracarea" instead of "area" for clarity and consistency with previous commit.
- FATES_ZSTAR_AP - FATES_SECONDAREA_ANTHRODIST_AP - FATES_SECONDAREA_DIST_AP - FATES_BURNFRAC_AP - FATES_FIRE_INTENSITY_BURNFRAC_AP - FATES_VEGC_AP - FATES_FUEL_AMOUNT_AP - FATES_CANOPYAREA_AP
Using fates_patch_type%area_by_age allows consolidation into one block, rather than splitting the calculation across two parts of update_history_hifrq2.
Moving calculation of canopy_area_by_age to an earlier patch loop allows consolidation into one block, rather than splitting the calculation across two parts of update_history_hifrq2.
|
||
! Increment the fractional area in each age class bin | ||
hio_area_si_age(io_si,cpatch%age_class) = hio_area_si_age(io_si,cpatch%age_class) & | ||
hio_fracarea_si_age(io_si,cpatch%age_class) = hio_fracarea_si_age(io_si,cpatch%age_class) & |
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 and the equivalent hio_fracarea_si_landuse code below can now actually be moved out of the patch loop and into an age-class loop.
As of |
Instead of dividing by total site area, divide by age class area.
…s area, not site area.
Unfortunately, my test script indicates that most variables are still not getting the right answer. Here, ✅ indicates that ageclass-area-weighted mean of the per-ageclass (
This is from a 4-year, 10x15 run with CTSM on Derecho. |
Looks like I'll have a look at the unchanged variables before marking this PR as ready for review. |
Should fix FATES_MORTALITY_CANOPY_SZAP and FATES_MORTALITY_USTORY_SZAP.
A note: I've updated my analysis script to use |
Alright, most everything is improved now; see the latest analysis outputs comparing before I did anything vs. f21fa95. Incremental changes:
I think this is ready to have someone look at it. Any suggestions as to what I'm doing wrong with the mortality variables would be much appreciated, but it'd be good to at least get opinions on the other stuff. |
@rgknox @ckoven and @samsrabin to schedule a meeting to review. |
Superseded by PR #1252. |
Description:
Will resolve #1205.
Collaborators:
@glemieux @rgknox @ckoven
Expectation of Answer Changes:
Checklist
If this is your first time contributing, please read the CONTRIBUTING document.
All checklist items must be checked to enable merging this pull request:
Contributor
Integrator
Documentation
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: