Skip to content

test(hydraulics): add pFUnit test suite for FatesBstressMod - #2

Open
johnpaulalex wants to merge 1 commit into
test/hydr-basefrom
test/hydr-bstress+hydr-base
Open

test(hydraulics): add pFUnit test suite for FatesBstressMod#2
johnpaulalex wants to merge 1 commit into
test/hydr-basefrom
test/hydr-bstress+hydr-base

Conversation

@johnpaulalex

Copy link
Copy Markdown
Owner

Description of changes

This PR adds a comprehensive pFUnit test suite (test_FatesBstress.pf) for FatesBstressMod, covering salinity transpiration stress calculations (btran_sal_stress_fates). It also updates CMake configuration to support out-of-tree isolated git worktree builds and resolves module dependencies (EDBtranMod.F90).

The test suite includes 6 targeted pFUnit test cases:

  • Exact analytical assertion of transpiration wetness factor ($rresis$) under default salinity conditions.
  • Upper bound cap limit verification ($rresis \le 1.0$) under zero/negative salinity edge cases.
  • Transpiration stress decay verification under high salinity ($S = 0.5$ ppt).
  • Sub-freezing soil layer exclusion verification ($T < T_{frz}$, ensuring frozen layers contribute 0 to stress).
  • Multi-patch linked list traversal verification ($p_1 \to p_2$).
  • Multi-PFT loop verification ($numpft = 2$).

Specific notes

Contributors other than yourself, if any:

Linked issues addressed, if any:

  • None

Description of generative AI usage:

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

Answer Changes & Scientific Impact

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

User Interface & Namelist Changes

  • Namelist / Defaults modified? No
  • XML / Build script changes? Yes (CMake worktree build path updates)

Testing planned or performed, if any:

  • Executed pFUnit regression tests (run_unit_tests.py -t fates_bstress)

CTSM / CESM baseline hash-tag: N/A
PR branch hash-tag: 245c55d

Requirements before merge:

  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors.
  • In-code documentation and Fortran docstrings updated.
  • This PR either (a) does not create a need to update documentation or (b) includes required documentation updates. Which?: (a) Bug fix / unit test addition; no documentation updates required.

@johnpaulalex
johnpaulalex force-pushed the test/hydr-base branch 2 times, most recently from e6a57b5 to bdaa2b9 Compare August 12, 2026 01:40
@johnpaulalex
johnpaulalex force-pushed the test/hydr-bstress+hydr-base branch 2 times, most recently from 21dd765 to f1bac9c Compare August 12, 2026 13:58
@johnpaulalex
johnpaulalex force-pushed the test/hydr-bstress+hydr-base branch from f1bac9c to 3b20978 Compare August 19, 2026 02:25
@johnpaulalex johnpaulalex changed the title test(fates): Add pFUnit test suite for FatesBstressMod test(hydraulics): add pFUnit test suite for FatesBstressMod Aug 19, 2026
@johnpaulalex
johnpaulalex marked this pull request as ready for review August 19, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant