Skip to content

973 test abiotic model with different number of canopy layers#976

Merged
vgro merged 6 commits intodevelopfrom
973-test-abiotic-model-with-different-number-of-canopy-layers
Jul 30, 2025
Merged

973 test abiotic model with different number of canopy layers#976
vgro merged 6 commits intodevelopfrom
973-test-abiotic-model-with-different-number-of-canopy-layers

Conversation

@vgro
Copy link
Copy Markdown
Collaborator

@vgro vgro commented Jul 30, 2025

This PR updates the tests in the abiotic folder to run with a varying number of canopy layers. This required introducing a few extra functions that deal with NaN and fixing how the layer thickness is calculated. I also fixed a sign error in the temperature updated.

You will see some slightly convoluted masking in some of the tests, that is to check that the true values are not NaN.

I haven't introduced a non-vegetated grid cell, this will be addressed in #975 .

Fixes #973

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@vgro vgro linked an issue Jul 30, 2025 that may be closed by this pull request
@vgro vgro requested a review from jacobcook1995 July 30, 2025 13:34
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.23%. Comparing base (ea7ac16) to head (514b974).
⚠️ Report is 1479 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #976      +/-   ##
===========================================
+ Coverage    94.21%   94.23%   +0.02%     
===========================================
  Files           79       79              
  Lines         6564     6589      +25     
===========================================
+ Hits          6184     6209      +25     
  Misses         380      380              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

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

LGTM!

@vgro vgro merged commit a35b1d0 into develop Jul 30, 2025
16 checks passed
@vgro vgro deleted the 973-test-abiotic-model-with-different-number-of-canopy-layers branch July 30, 2025 15:16
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.

Test abiotic model with different number of canopy layers

3 participants