Added nitrogen limitation for microbial growth#628
Conversation
…n for microbial nutrient uptake rates
…ass and mineral associated organic matter
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #628 +/- ##
========================================
Coverage 94.69% 94.69%
========================================
Files 73 73
Lines 4541 4582 +41
========================================
+ Hits 4300 4339 +39
- Misses 241 243 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dalonsoa
left a comment
There was a problem hiding this comment.
Just a couple of suggestions and questions, but looks good!
| def calculate_nutrient_flows_to_necromass( | ||
| microbial_changes: MicrobialChanges, constants: SoilConsts | ||
| ) -> NDArray[np.float32]: | ||
| """Calculate the rate at which nutrients flow into the necromass pool. | ||
|
|
||
| These flows comprise of the nitrogen and phosphorus content of the dead cells and | ||
| denatured enzymes that flow into the necromass pool. | ||
|
|
||
| TODO - A core assumption here is that the stochiometry of the enzymes are identical | ||
| to the microbial cells. This assumption works for now but will have to be revisited | ||
| when fungi are added (as they have different stochiometric ratios but will | ||
| contribute to the same enzyme pools) |
There was a problem hiding this comment.
I guess you have a separate function for this and the chosen inputs as there might be other, more complex stuff going on in the future in this function, right? Otherwise, this functions seems a bit overkilling for a simple division.
There was a problem hiding this comment.
Yep in future, the microbial pool will be separated into (at least) a bacterial pool and a fungal pool. These pools will have different stoichiometry which means the calculation will become more involved, so the function is basically a placeholder for when I will do this.
Description
This PR adds in nitrogen flows between the full set of soil carbon pools and adds nitrogen as a factor limiting microbial growth. The nitrogen content of the microbial biomass (and enzymes) is not explicitly tracked as microbial biomass is assumed to have fixed stoichiometry (which means it is already tracked implicitly).
This pull request basically just adds a few new variables and new functions to update them, there are not any significant structural changes. Let me know if you notice any areas needing improvement!
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks