Additional checks for crown depth allometry parameters #1314
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 pull request intends to address the discussion in #1308, by adding multiple sanity checks on the parameters for height to crown depth allometry in subroutine
PRTCheckParams
. With this revision, it will issue either an error or a warning, depending on the severity of the problem.fates_allom_h2cd1 ≤ 0.
fates_allom_dmode = 1
andfates_allom_h2cd1 > 1
.fates_allom_dmode = 2
,fates_allom_h2cd2 = 1
andfates_allom_h2cd1 > 1
(which is identical to previous case).fates_allom_dmode = 2
,fates_allom_h2cd1 < 1
andfates_allom_h2cd1
is such that crown depth would exceed height for small cohorts.fates_allom_dmode = 2
,fates_allom_h2cd1 > 1
andfates_allom_h2cd1
is such that crown depth would exceed height for large cohorts.In the warning cases, FATES was already applying a cap to prevent crown depth to exceed height, but this was done quietly. The code now issues a warning during initialisation.
Collaborators:
@glemieux @rgknox @ekluzek
Expectation of Answer Changes:
No change in the results expected, except that now the code will not even run if the parameters are out of bounds, or at least issue a warning when some potentially unwanted behaviour occurs.
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: