refactor(cohort): implement lightweight two-phase cohort creation - #1601
Draft
johnpaulalex wants to merge 1 commit into
Draft
refactor(cohort): implement lightweight two-phase cohort creation#1601johnpaulalex wants to merge 1 commit into
johnpaulalex wants to merge 1 commit into
Conversation
1 task
johnpaulalex
force-pushed
the
refactor/cohort-create
branch
from
August 8, 2026 16:41
e90e158 to
53e0e6a
Compare
…reateBare for unit tests
johnpaulalex
force-pushed
the
refactor/cohort-create
branch
from
August 8, 2026 16:55
53e0e6a to
36c49d7
Compare
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.
Description:
Refactors the
fates_cohort_typeconstructor from a monolithic procedure into a clean two-stage lifecycle (InitRawfor memory/identity initialization andUpdateDerivedStatefor allometry/parameter queries). Adds lightweightCreateBareconstructor for unit tests, enabling test fixtures to instantiate valid cohort linked lists without initializing global parameter tables or running heavy allometry routines.Specific notes
Collaborators:
Linked issues addressed, if any:
Preview of Child Branches
fix+test/biogeophys-accum-fluxes+cohort-create(fix(fates): fix c13disc_acc weighting order and add EDAccumulateFluxes unit tests #1602): Fixesc13disc_accweighting order calculation bug inEDAccumulateFluxesMod, adds zero-denominator underflow protection, introducesCreateTestSiteandSetTestFluxestest factory helpers inFatesFactoryMod, and refactorstest_EDAccumulateFluxes.pfunit test suite.Expectation of Answer Changes:
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:
5efa6fbfd173afe85d523431e75c8a6ec493b242FATES baseline hash-tag:
36c49d7eTest Output:
[x] Executed pFUnit / CIME regression tests