Skip to content

test: add leaf biophysics pFUnit unit test suite#1589

Open
johnpaulalex wants to merge 1 commit into
NGEET:mainfrom
johnpaulalex:test/leaf-biophysics
Open

test: add leaf biophysics pFUnit unit test suite#1589
johnpaulalex wants to merge 1 commit into
NGEET:mainfrom
johnpaulalex:test/leaf-biophysics

Conversation

@johnpaulalex

Copy link
Copy Markdown
Contributor

(not planning to submit yet, just want to start a discussion)

Add unit tests for LeafBiophysicsMod covering:

  • QSat: saturation vapor pressure and specific humidity
  • StomatalCondMedlyn and StomatalCondBallBerry: stomatal conductance
  • LowstorageMainRespReduction: low-storage maintenance respiration scaling
  • LeafLayerMaintenanceRespiration_Ryan_1991 and _Atkin_etal_2017: temperature-dependent respiration
  • GetCanopyGasParameters: Michaelis-Menten CO2/O2 temperature scaling

Integrate the new suite into CMakeLists.txt and testing/config/unit.cfg so it is picked up by run_unit_tests.py.

Description:

Collaborators:

Expectation of Answer Changes:

Description of generative AI usage (as necessary)

Checklist

If this is your first time contributing, please read the CONTRIBUTING document.

All checklist items must be checked to enable merging this pull request:

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

If satellite phenology regressions are not b4b, please hold merge and notify the FATES development team.

Documentation

Test Results:

CTSM (or) E3SM (specify which) test hash-tag:

CTSM (or) E3SM (specify which) baseline hash-tag:

FATES baseline hash-tag:

Test Output:

Add unit tests for LeafBiophysicsMod covering:
- QSat: saturation vapor pressure and specific humidity
- StomatalCondMedlyn and StomatalCondBallBerry: stomatal conductance
- LowstorageMainRespReduction: low-storage maintenance respiration scaling
- LeafLayerMaintenanceRespiration_Ryan_1991 and _Atkin_etal_2017: temperature-dependent respiration
- GetCanopyGasParameters: Michaelis-Menten CO2/O2 temperature scaling

Integrate the new suite into CMakeLists.txt and testing/config/unit.cfg
so it is picked up by run_unit_tests.py.
@rgknox

rgknox commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for the submissions @johnpaulalex
Tests are always welcome and certainly useful


! tol: near the 64-bit float representational limit; inline tolerances used where
! hand-calculated values warrant lower precision (e.g. 1.e-6_r8).
real(r8), parameter :: tol = 1.e-13_r8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually need to start migrating to using this constant in more of the models internal code.

@rgknox rgknox added testing: pure B4B No differences in any tests software: not API changing Does not require a change to the HLM API parameters: no change labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parameters: no change software: not API changing Does not require a change to the HLM API testing: pure B4B No differences in any tests

Projects

Status: Finding Reviewers

Development

Successfully merging this pull request may close these issues.

2 participants