Skip to content

Adding subcanopy transpiration to transpiration#1192

Merged
davidorme merged 4 commits intodevelopfrom
1182-plant-model-needs-to-return-understorey-transpiration
Dec 16, 2025
Merged

Adding subcanopy transpiration to transpiration#1192
davidorme merged 4 commits intodevelopfrom
1182-plant-model-needs-to-return-understorey-transpiration

Conversation

@davidorme
Copy link
Copy Markdown
Collaborator

Description

Before this PR, we had two transpiration variables in data:

  • transpiration, created and updated in PlantsModel.estimate_gpp.
  • subcanopy_transpiration created and updated by Subcanopy.calculate_dynamics

With this PR:

  • A data["transpiration"] array (layers x cells) is added to the reset_update_vars() method, so is initialised centrally by update
  • The appropriate rows in that array are then updated by the two methods above.
  • The subcanopy_transpiration array is removed.

Fixes #1182

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

@davidorme davidorme linked an issue Dec 10, 2025 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.00%. Comparing base (031afce) to head (2578340).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1192   +/-   ##
========================================
  Coverage    95.00%   95.00%           
========================================
  Files           71       71           
  Lines         7269     7271    +2     
========================================
+ Hits          6906     6908    +2     
  Misses         363      363           

☔ 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

@sallymatson sallymatson left a comment

Choose a reason for hiding this comment

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

LGTM

@davidorme
Copy link
Copy Markdown
Collaborator Author

@vgro I think this fixes the problem - can you just look and see if anything seems problematic?

@davidorme davidorme requested a review from vgro December 15, 2025 10:02
Copy link
Copy Markdown
Collaborator

@vgro vgro left a comment

Choose a reason for hiding this comment

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

LGTM

@davidorme davidorme merged commit f1d1164 into develop Dec 16, 2025
13 checks passed
@davidorme davidorme deleted the 1182-plant-model-needs-to-return-understorey-transpiration branch December 16, 2025 11:48
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.

Plant model needs to return understorey transpiration

4 participants