Unpin the update interval in hydrology#981
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #981 +/- ##
===========================================
- Coverage 94.23% 94.23% -0.01%
===========================================
Files 79 79
Lines 6589 6587 -2
===========================================
- Hits 6209 6207 -2
Misses 380 380 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jacobcook1995
approved these changes
Aug 1, 2025
Collaborator
jacobcook1995
left a comment
There was a problem hiding this comment.
LGTM! (Honestly really surprised that that litter model typing ever passed CI)
vgro
reviewed
Aug 1, 2025
vgro
approved these changes
Aug 1, 2025
Collaborator
vgro
left a comment
There was a problem hiding this comment.
LGTM!
Could you please delete the TODO in line 18 in hydrology_model.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR:
hydrologymodel to allow intervals other than 30 days and adds code to calculate the actual number of days in the update interval. It warns when the update interval is not a whole number of days.1 weekwould fail - I've retained the1 weektest case but updated it to show that it works. The resulting test values seem sensible: the model gets the same precipitation in fewer days, so the vertical flow and runoff are higher, but there is less time for soil evaporation, which is lower.There are also a couple of requires
mypyfixes - thenumpyplugin formypyhas been deprecated and the new system picks up a couple of things.@jacobcook1995 There are a couple of weird typing things here from
litter: two functions that claimed to returndict[str, NDArray]but didn't and hadn't been caught for some reason.Fixes #980
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks