Add effective saturation calculation to hydrology tools#881
Merged
jacobcook1995 merged 4 commits intodevelopfrom Jun 4, 2025
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #881 +/- ##
========================================
Coverage 94.79% 94.80%
========================================
Files 75 75
Lines 5590 5597 +7
========================================
+ Hits 5299 5306 +7
Misses 291 291 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vgro
reviewed
Jun 4, 2025
vgro
reviewed
Jun 4, 2025
| top_soil_layer_thickness: Thickness of the topsoil layer [mm]. | ||
| soil_moisture_saturation: The :term:`soil moisture saturation` [unitless]. | ||
| soil_moisture_residual: The :term:`soil moisture residual` [unitless]. | ||
| top_soil_layer_thickness: Thickness of the topsoil layer [m]. |
Collaborator
There was a problem hiding this comment.
nice use of glossary here :-)
vgro
reviewed
Jun 4, 2025
| ) | ||
|
|
||
| # Load hydrology constants | ||
| hydro_constants = load_constants(config, "hydrology", "HydroConsts") |
Collaborator
There was a problem hiding this comment.
This looks like a neat solution to the different constants, I should adopt this to my models...
…aturation-should-be-moved-to-hydrology-tools
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
The effective saturation calculation has now been added as a function in hydrology tools, so that the hydrology model and the soil model use the same calculation.
The soil model now uses
soil_moisture_saturationandsoil_moisture_saturationfromHydroConstsrather thansoil_moisture_capacityfromCoreConstswhich should unblock #880I also changed the core testing to use the litter model as a test case rather than the soil model. This has been annoying me for a while, and I reached breaking point so switching the testing to use the simpler model.
Fixes #770
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks