Skip to content

Write subcanopy biomasses to data during PlantMode.__init__#1335

Merged
davidorme merged 2 commits intodevelopfrom
1333-write-subcanopy-biomasses-to-data-during-__init__
Feb 13, 2026
Merged

Write subcanopy biomasses to data during PlantMode.__init__#1335
davidorme merged 2 commits intodevelopfrom
1333-write-subcanopy-biomasses-to-data-during-__init__

Conversation

@davidorme
Copy link
Copy Markdown
Collaborator

Description

This PR:

  • Updates the Subcanopy.__init__ method to include writing the subcanopy pool CNP arrays to data. This is so that these arrays are available during AnimalModel.__init__ for the setup of ArrayResources (Array resources implementation #1318).
  • Fixes a misleading error message from the variables module.
  • Fixes a bug in the Subcanopy - the seedbank biomass was replacing the vegetation biomass.

Fixes #1333

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 Feb 12, 2026 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.95%. Comparing base (0e7fd6a) to head (26f45a1).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1335   +/-   ##
========================================
  Coverage    94.95%   94.95%           
========================================
  Files           71       71           
  Lines         7369     7379   +10     
========================================
+ Hits          6997     7007   +10     
  Misses         372      372           

☔ 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 davidorme merged commit a936f3c into develop Feb 13, 2026
13 checks passed
@davidorme davidorme deleted the 1333-write-subcanopy-biomasses-to-data-during-__init__ branch February 13, 2026 12:15
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.

Write subcanopy biomasses to data during __init__

3 participants