Skip to content

1149 bug fixing abiotic model#1153

Merged
vgro merged 9 commits intodevelopfrom
1149-bug-fixing-abiotic-model
Nov 19, 2025
Merged

1149 bug fixing abiotic model#1153
vgro merged 9 commits intodevelopfrom
1149-bug-fixing-abiotic-model

Conversation

@vgro
Copy link
Copy Markdown
Collaborator

@vgro vgro commented Nov 19, 2025

This PR gets rid of the loop for different time steps because it is currently not relevant and causes problems with getting the right time interval for the integration.

I also corrected the unit of latent heat of vaporization (*1000 everywhere) and corrected the signs of energy fluxes in places ( the convention is negative away from the surface towards the atmosphere).

I also found out why the canopy temperatures go crazy, spoiler alert: it's not the Newton method, but will address this in #1022 .

Fixes #1149

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 Nov 19, 2025 that may be closed by this pull request
@vgro vgro requested a review from jacobcook1995 November 19, 2025 11:51
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.36%. Comparing base (f7e89fd) to head (8493f92).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1153   +/-   ##
========================================
  Coverage    94.35%   94.36%           
========================================
  Files           70       70           
  Lines         7049     7041    -8     
========================================
- Hits          6651     6644    -7     
+ Misses         398      397    -1     

☔ 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.

Removing the looping seems sensible to me!

return_fluxes=False,
maxiter=10000,
)
print(canopy_temperature)
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.

Guess this line should be deleted

@vgro vgro merged commit 0d070d9 into develop Nov 19, 2025
13 checks passed
@vgro vgro deleted the 1149-bug-fixing-abiotic-model branch January 7, 2026 11:04
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.

Bug fixing abiotic model

3 participants