Skip to content

refactor(cohort): implement lightweight two-phase cohort creation - #1601

Draft
johnpaulalex wants to merge 1 commit into
NGEET:mainfrom
johnpaulalex:refactor/cohort-create
Draft

johnpaulalex wants to merge 1 commit into
NGEET:mainfrom
johnpaulalex:refactor/cohort-create

Conversation

@johnpaulalex

@johnpaulalex johnpaulalex commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Description:

Refactors the fates_cohort_type constructor from a monolithic procedure into a clean two-stage lifecycle (InitRaw for memory/identity initialization and UpdateDerivedState for allometry/parameter queries). Adds lightweight CreateBare constructor 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:

  • None

Preview of Child Branches

Expectation of Answer Changes:

  • Bit-for-Bit (B4B) with baseline master
  • Roundoff-level differences only
  • Expected Answer Changes (ECA)

Description of generative AI usage (as necessary)

Google Antigravity was used to write the code and tests, followed by human-guided verification.

Checklist

Contributor

  • The in-code documentation has been updated with descriptive comments
  • The documentation has been assessed to determine if updates are necessary
  • Describe use of generative AI (if necessary)

Integrator

  • FATES PASS/FAIL regression tests were run
  • Evaluation of test results for answer changes was performed and results provided
  • FATES-CLM6 Code Freeze: satellite phenology regression tests are b4b

Test Results:

CTSM (or) E3SM (specify which) test hash-tag: N/A
CTSM (or) E3SM (specify which) baseline hash-tag: 5efa6fbfd173afe85d523431e75c8a6ec493b242
FATES baseline hash-tag: 36c49d7e

Test Output:
[x] Executed pFUnit / CIME regression tests

@johnpaulalex
johnpaulalex force-pushed the refactor/cohort-create branch from 53e0e6a to 36c49d7 Compare August 8, 2026 16:55
@rgknox
rgknox requested a review from adrifoster August 10, 2026 19:17
@rgknox rgknox added the uncategorized Has not experienced any intake or triage from integrators. label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

uncategorized Has not experienced any intake or triage from integrators.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants