Skip to content

1181 canopy evaporation is not returned properly#1227

Merged
vgro merged 20 commits intodevelopfrom
1181-canopy-evaporation-is-not-returned-properly
Dec 16, 2025
Merged

1181 canopy evaporation is not returned properly#1227
vgro merged 20 commits intodevelopfrom
1181-canopy-evaporation-is-not-returned-properly

Conversation

@vgro
Copy link
Copy Markdown
Collaborator

@vgro vgro commented Dec 16, 2025

The problem was that part of the canopy water balance were averaged over all canopy layers and therefore returned 1D variables - for the rest to work we require 2D variables. This PR updates interception and canopy evaporation to 3D and includes the understorey layer. I dropped the leaf_drainage for simplification - we assume that all water falls down in one time step (1 day) so it was a bit pointless.

I also got rid of the understorey aerodynamic resistance for now assuming that it is the same as the canopy, and I renamed the aerodynamic resistance of the soil for clarification (see this comment) by @davidorme .

I believe this also fixes #1162 .

Fixes #1181

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 Dec 16, 2025 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.96%. Comparing base (f1d1164) to head (e06fd95).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1227      +/-   ##
===========================================
- Coverage    95.00%   94.96%   -0.04%     
===========================================
  Files           71       71              
  Lines         7271     7273       +2     
===========================================
- Hits          6908     6907       -1     
- Misses         363      366       +3     

☔ 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

@davidorme davidorme left a comment

Choose a reason for hiding this comment

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

LGTM

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, just one small thing


[[variable]]
axis = ["spatial"]
description = "Interception"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Think this needs a longer description

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh hell, they all need a longer description. And units. And proper axes. I think we're gunna need a bigger PR 😄

@davidorme
Copy link
Copy Markdown
Collaborator

@vgro When this merges, does that unstick the problem with the naming changes in #1223?

@vgro
Copy link
Copy Markdown
Collaborator Author

vgro commented Dec 16, 2025

@vgro When this merges, does that unstick the problem with the naming changes in #1223?

yes it should, see intro :-)

@vgro vgro merged commit 750a13c into develop Dec 16, 2025
13 checks passed
@vgro vgro deleted the 1181-canopy-evaporation-is-not-returned-properly branch December 16, 2025 15:22
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.

canopy evaporation is not returned properly Surface precipitation should not get negative

4 participants