Changed litter model to use exact solution for the litter pool size#1001
Merged
jacobcook1995 merged 22 commits intodevelopfrom Aug 20, 2025
Merged
Conversation
… rates rather than masses
…o soil can still be calculated
…atabble with analytic approach to finding final pool values
…h as C:N and C:P ratios
… nutrient avaliability
…ing a bounded function
… from total loss to a rate
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1001 +/- ##
===========================================
+ Coverage 94.82% 94.90% +0.08%
===========================================
Files 79 80 +1
Lines 6511 6616 +105
===========================================
+ Hits 6174 6279 +105
Misses 337 337 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vgro
reviewed
Aug 18, 2025
vgro
reviewed
Aug 18, 2025
vgro
approved these changes
Aug 19, 2025
Collaborator
vgro
left a comment
There was a problem hiding this comment.
Looks sensible to me, I cannot comment much on the science
hrlai
reviewed
Aug 20, 2025
hrlai
reviewed
Aug 20, 2025
hrlai
reviewed
Aug 20, 2025
hrlai
approved these changes
Aug 20, 2025
Collaborator
hrlai
left a comment
There was a problem hiding this comment.
Looks good, I've read the theory document only and it makes sense.
Collaborator
Author
|
Great, thanks both of you! I've made the suggested docs changes and will go ahead and merge now |
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 changes the litter model to use an exact analytic solution for the pool size with time. The new model approach is in this part of the docs.
While making this change I realised that the way I was averaging nutrient ratios was incorrect. I decided it made most sense to fix that at the same time, but that means that this PR has ballooned in size
@vgro, this fixes the issue of the negative litter pools crashing
ve_runwhen theabioticmodel is included. Unfortunately, it still doesn't run, but it's now a soil model error (linked to #536) so that's progress@hrlai, I've add you as a reviewer but don't worry about looking at the code, if you could sense check the documentation + check that it fits with the models that you are fitting for the parameterisation, that would be great!
Fixes #979, Fixes #991, Fixes #969
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks