Simplified mycorrhizal uptake model#1266
Merged
jacobcook1995 merged 5 commits intodevelopfrom Jan 21, 2026
Merged
Conversation
…rolled solely by the microbes rather than microbes and plants
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1266 +/- ##
===========================================
- Coverage 95.05% 95.05% -0.01%
===========================================
Files 71 71
Lines 7298 7317 +19
===========================================
+ Hits 6937 6955 +18
- Misses 361 362 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
davidorme
approved these changes
Jan 21, 2026
Collaborator
davidorme
left a comment
There was a problem hiding this comment.
Yup - LGTM. I think this is cleaner code, easy to explain and a reasonable approximation, and it avoids a whole lot of unpleasantness from the previous version. One minor niggle on code.
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 simplifies the mycorrhizal uptake model by reducing the amount of information being passed backwards and forwards between the
soilandplantsmodels.Instead, the mycorrhizal fungi allocate a fixed (but configurable) portion of their nutrient uptake to supply the plants. And the total amount supplied is passed to the plants at the next model time step.
Getting this to work requires making an initial estimate of the amount of nutrients supplied (in the soil model init). This estimate is based on the initial state of the model with the assumption that the microbes take up nutrients at the maximum possible rate.
I've added documentation justifying the new model. Let me know if it makes sense!
Fixes #1197
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks