-
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
cleaning up nocomp patch indexing #1226
base: main
Are you sure you want to change the base?
Conversation
For the hlm-fates interface mod, we skip the hlm bareground patch, |
FATES test suite is generating some unexpected fails and diffs with base. The coldbasic satphen tests show differences in 'PCT_NAT_PFT' I think some of this has to do with fire and how we decide which patch to use for input boundary conditions on the site scale? Either way, plenty to fix here.
|
I'm realizing there is a subtle flaw in the approach to this PR. When in nocomp and fixed-biogeo modes (including and excluding SP mode), there is an assumption that the patch index is equivalent to the PFT index of that patch. While the most of logic in the changes hold, this discontinuity affects output such as PCT_NAT_VEG, and other variables that have this assumption. |
…of cpatch%patchno (which uses a function call to define)
ffc59b6
to
0be5cd1
Compare
As per the previous comment (Dec 28th 2024), this PR has been re-structured. The idea of shifting indexes and abandoning the zero patch created too many issues. The current set of changes seeks only to make our methods more consistent.
|
The updated set of changes does generate B4B results with base using the fates test suite, when comparing to a special base that incorporated only item "3" in the previous post. |
Description:
This set of changes removes the need for all these checks that determine if a patch is nocomp+fixedbiogeog. We currently do this check because when in this mode, we construct a bareground patch in the zero-th patch index position. When we traverse patch loops, sometimes we increment the patch index, and this logic check makes sure that we don't increment.
However, we don't need to put this special bare-ground patch in the zeroth position. We can just put it in the first position, and allow it to be in-line index-wise with the what ELM/CLM identifies as the 1st vegetated patch. This is fine, FATES has patches in the full dynamics mode that have no cohorts, it's used to having patches with no vegetation lined-up with patches in CLM/ELM that are "vegetated". What happens is we set the weighting to zero, and many of the fluxes are some nominal value.
We also don't need to touch the ELM/ELM side of the code, because the way we create out weightings actaully works for both the indexing schemes described. Why? because we assign the CLM/ELM bare-ground patch fraction based on 1 minus the sum of all patches total canopy area, which doesn't care about index position.
Here are some slides that give a sense of what is going on and what is proposed: https://docs.google.com/presentation/d/1ZwErNVF3B-_jJwpCDud3d-MtR59Idax8YTWe_ErEc8Q/edit?usp=sharing
Further, if someone want's to bypass some subset of physics, or some algorithm, because there is no vegetation, it would be more appropriate anyway to compare against total canopy area, and not if it is a nocomp+bareground patch.
I still need to make sure that we don't exceed our patch counts on the fates-side when in nocomp+fixedbiogeog, in this mode we were using 1 less space as we matched with ELM/CLM arrays.
Collaborators:
Discussions with @glemieux
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: