fix(hydraulics): fix SumBetweenDepths layer integration logic and add pFUnit tests - #1603
Open
johnpaulalex wants to merge 3 commits into
Open
fix(hydraulics): fix SumBetweenDepths layer integration logic and add pFUnit tests#1603johnpaulalex wants to merge 3 commits into
johnpaulalex wants to merge 3 commits into
Conversation
7 tasks
rgknox
self-requested a review
August 10, 2026 18:32
…od and EDTypesMockMod
… pFUnit test Corrects partial-layer depth integration calculations in SumBetweenDepths when top and bottom integration depths fall within a single soil layer or at the topmost layer boundary (i_rhiz_b == 0). Adds test_SumBetweenDepths to FatesPlantHydraulicsMod_geom_test.pf.
johnpaulalex
force-pushed
the
fix/sum-btwn-depths+hydr-plant
branch
from
August 12, 2026 01:45
de7afd1 to
44d99c1
Compare
Contributor
|
@johnpaulalex this is a meta-question: how come the draft doesn't use the FATES PR template? I think it looks nicely formatted and we could update our standard FATES PR template. That said, it looks like some details might have been inspired by the CTSM PR which may not apply here. |
Contributor
Author
|
ah TIL; it's because I've been using AI to build my PR's and I didn't tell it to dynamically choose the right template for the repo. I've fixed that. |
johnpaulalex
marked this pull request as ready for review
August 19, 2026 12:16
9 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Parent PR: #1608 (Base branch:
test/hydr-plant+hydr-base)Description:
Fixes partial-layer depth integration calculations in
SumBetweenDepthswithinbiogeophys/FatesPlantHydraulicsMod.F90. Specifically:depth_t) and bottom depth (depth_b) fall within the exact same soil rhizosphere layer (i_rhiz_t - 1 == i_rhiz_b + 1). Previously, partial layer fractions were miscalculated or double-counted across layer boundaries.i_rhiz_b == 0when integrating from the surface down through the top layer (frac = depth_b / dz_rhiz(1)).SumBetweenDepthsfor unit testing and adds comprehensive test coverage (test_SumBetweenDepthsinFatesPlantHydraulicsMod_geom_test.pf) verifying integration density across non-uniform soil layer interfaces, partial overlaps, and out-of-bound depth limits.Specific notes
Collaborators:
Linked issues addressed, if any:
Expectation of Answer Changes:
i_rhiz_b == 0). Simulations without plant hydraulics remain Bit-for-Bit (B4B).Description of generative AI usage (as necessary)
Google Antigravity was used to write the code and tests, followed by human-guided verification.
Checklist
Contributor
Integrator
Test Results:
CTSM (or) E3SM (specify which) test hash-tag: N/A
CTSM (or) E3SM (specify which) baseline hash-tag: N/A
FATES baseline hash-tag:
de7afd15Test Output:
[x] Executed pFUnit / CIME regression tests