-
Notifications
You must be signed in to change notification settings - Fork 103
Migrate 10-day memory variables out of the main phenology sub-routine #1389
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
Open
mpaiao
wants to merge
56
commits into
NGEET:main
Choose a base branch
from
mpaiao:mpaiao-pr-10davgs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…values used by phenology from phenology. This will help to modularise the code, and allow other parts of the code to use these averages.
…ne with more recent versions of FATES.
…to the existing module.
Probably integrate #1355 before this one. |
5 tasks
The goal here is to simplify things and improve my understanding before more substantive refactoring and fixing. Changes: - Do everything within one patch loop, rather than looping through to get numerators and denominators separately, then looping again to do the division. - Use new "weight" variable instead of repeating (e.g.) "cpatch*area * AREA_INV". - Replace "hio_area_si_age(io_si, ipa2)*AREA" with "sites(s)%area_by_age(ipa2)" - Replace "sites(s)%area_by_age(cpatch%age_class)" with new "age_class_area" variable. Should be identical within roundoff precision. Affected variables: - FATES_BURNFRAC_AP - FATES_CANOPYAREA_AP - FATES_FIRE_INTENSITY_BURNFRAC_AP - FATES_FUEL_AMOUNT_AP - FATES_GPP_AP - FATES_LAI_AP - FATES_LBLAYER_COND_AP - FATES_NCL_AP - FATES_NPP_AP - FATES_SCORCH_HEIGHT_APPF - FATES_SECONDAREA_ANTHRODIST_AP - FATES_SECONDAREA_DIST_AP - FATES_STOMATAL_COND_AP - FATES_VEGC_AP - FATES_ZSTAR_AP Also renames various internal FatesHistoryInterfaceMod variables from "area" to "fracarea" for clarity (units are m2/m2, not m2).
To avoid similar mistakes in the future, adds function SumMortForHistory to fates_cohort_type.
These are useful for checking whether the per-ageclass versions are normalized correctly. * FATES_CANOPYAREA * FATES_NCL * FATES_PATCHAREA * FATES_SCORCH_HEIGHT_PF * FATES_SECONDAREA_ANTHRODIST * FATES_SECONDAREA_DIST * FATES_ZSTAR
Now dividing by total site area instead of age-class area: - FATES_GPP_AP - FATES_NPP_AP - FATES_LAI_AP - FATES_NCL_AP - FATES_SCORCH_HEIGHT_APPF Now dividing by site-wide canopy area instead of age-class canopy area: - FATES_LBLAYER_COND_AP - FATES_STOMATAL_COND_AP
Tell the user how to get the value they probably want---the value on each age-class---rather than what each age-class contributes to the cross-ageclass area-weighted mean.
- Use descriptive weight names - Remove unused variable ipa - Organize into sections - Add a TODO
- Use descriptive weight names - Remove unused variable ipa - Fix indentation
(Also add postprocessing info, where needed.) - FATES_NPLANT_SZAP - FATES_NPLANT_CANOPY_SZAP - FATES_NPLANT_USTORY_SZAP - FATES_NPLANT_SZAPPF - FATES_NPATCH_AP - FATES_CANOPYAREA_AP - FATES_SECONDAREA_ANTHRODIST_AP - FATES_SECONDAREA_DIST_AP - FATES_PATCHAREA_AP - Unused fire rate-of-spread output
Used in history outputs to get biomass of each organ, plus alive and total biomass.
Co-authored-by: Gregory Lemieux <7565064+glemieux@users.noreply.github.com>
Useful for checking that FATES_PRIMARY_AREA_AP has the correct denominator.
…_AP. For consistency with other ageclass-stratified outputs.
… counts, and updating everything else that dependons on that.
…ler than the maxloc method
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This is the first step towards refactoring the phenology code. As described in #1385, in this step I create a new module that manages the cumulative/memory variables (
main/FatesCumulativeMemoryMod.F90
), with a main (public) sub-routine that handles all the updates (UpdateCumulativeMemoryVars
) and calls sub-routines that update the date-, temperature- and moisture-related memory variables.As described in #1385, a new module was necessary (instead of adding to the existing
FatesRunningMeanMod
) to avoid module circularity, as the new module usesEDTypesMod
andEDTypesMod.F90
usesFatesRunningMeanMod
.Collaborators:
@XiulinGao @ckoven @rgknox @lmkueppers @rosiealice @glemieux
Expectation of Answer Changes:
At this point, the results should be bit-for-bit.
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
If satellite phenology regressions are not b4b, please hold merge and notify the FATES development team.
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: