fix(fates): fix c13disc_acc weighting order and add EDAccumulateFluxes unit tests - #1598
Closed
johnpaulalex wants to merge 3 commits into
Closed
fix(fates): fix c13disc_acc weighting order and add EDAccumulateFluxes unit tests#1598johnpaulalex wants to merge 3 commits into
johnpaulalex wants to merge 3 commits into
Conversation
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
from
August 8, 2026 13:48
801c3e7 to
e5fdce1
Compare
8 tasks
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
2 times, most recently
from
August 8, 2026 16:47
616be03 to
aed3ed7
Compare
…reateBare for unit tests
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
from
August 8, 2026 16:55
aed3ed7 to
3b86ecf
Compare
9 tasks
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
2 times, most recently
from
August 8, 2026 17:08
6bd93a7 to
58bb1bf
Compare
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
from
August 8, 2026 17:11
58bb1bf to
960a4f1
Compare
…es/CreateTestSite helpers in FatesFactoryMod
johnpaulalex
force-pushed
the
fix/biogeophys-accum-fluxes-and-tests
branch
from
August 8, 2026 17:15
960a4f1 to
698b143
Compare
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.
Depends on parent PR: #1601
Description of changes
Fixes a calculation ordering bug in
EDAccumulateFluxesMod.F90wheregpp_accwas accumulated before computing thec13disc_accweighted mean, resulting in double-countinggpp_tstepin the denominator. Also updates the zero-denominator check to<= 0.0_r8for negative total GPP underflow protection, and adds a full pFUnit test suite (test_EDAccumulateFluxes.pf) verifying multi-site iteration, multi-cohort/multi-layer accumulation, empty cohort linked lists, and underflow protections.Refactoring & Test Helpers
Refactored
test_EDAccumulateFluxes.pfusing two new shared test factory helpers inFatesFactoryMod.F90(CreateTestSiteandSetTestFluxes), reducing setup boilerplate across the file by 211 net lines.Testing performed:
ed_accumulate_fluxestest suite (100% passed)