Skip to content

test(hydraulics): add shared PRT, PFT, and site/cohort mock test infrastructure - #1599

Open
johnpaulalex wants to merge 3 commits into
NGEET:mainfrom
johnpaulalex:test/hydr-base
Open

test(hydraulics): add shared PRT, PFT, and site/cohort mock test infrastructure#1599
johnpaulalex wants to merge 3 commits into
NGEET:mainfrom
johnpaulalex:test/hydr-base

Conversation

@johnpaulalex

@johnpaulalex johnpaulalex commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description:

This PR adds FatesUnitTestPRTParametersMod.F90 and EDPftvarconMockMod.F90 under testing/tests/fortran_shr/ as reusable test helper modules for plant hydraulics and soil unit test suites.

It provides parameter initialization, physical constant sourcing with SI units ([g/cm3], [m2/g C], [1/m], [cm]), and explicit allocation/teardown support (cleanup_mock_prt_params()) to ensure clean state restoration in pFUnit setUp() and tearDown() blocks.

Preview of Child Branches

  • test/hydr-bstress+hydr-base: Adds pFUnit test suite (test_FatesBstress.pf) for FatesBstressMod to test plant water stress factors.
  • test/hydr-btran+hydr-base: Adds pFUnit test suite (test_EDBtran.pf) for EDBtranMod to test transpiration beta factor calculations.
  • test/hydr-plant+hydr-base: Adds pFUnit test suites (cohort, drive, geom, init, sizedep) for FatesPlantHydraulicsMod alongside EDTypesMockMod.F90.
  • test/hydr-plant-explicit+hydr-base: Implements explicit plant hydraulics solver unit tests for FatesPlantHydraulicsMod.
  • test/matsolve2d-explicit+hydr-base: Implements explicit 2D matrix solver (MatSolve2D) and layer integration unit tests.
  • fix/sum-btwn-depths+hydr-plant: Fixes SumBetweenDepths soil layer integration logic in FatesPlantHydraulicsMod.F90 and adds pFUnit verification tests.

Specific notes

Collaborators:

Linked issues addressed, if any:

  • Contributes to plant hydraulics unit testing suite fortification.

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: 5efa6fbf
FATES baseline hash-tag: bdaa2b99

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

@johnpaulalex johnpaulalex changed the title test(fates): Add FatesUnitTestPRTParametersMod helper for hydraulics and soil tests test(fates): Add FatesUnitTestPRTParametersMod and EDPftvarconMockMod helpers Aug 12, 2026
@johnpaulalex johnpaulalex changed the title test(fates): Add FatesUnitTestPRTParametersMod and EDPftvarconMockMod helpers test(hydraulics): add shared PRT, PFT, and site/cohort mock test infrastructure Aug 19, 2026
@johnpaulalex
johnpaulalex marked this pull request as ready for review August 19, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants