When the simulation is run with all models static apart from the soil model the densities of the mycorrhizal fungi get driven to negative values.
This happens because the rate at which plants take nutrients from the mycorrhizal fungi is static, so nutrients are taken from the fungi even if they have no biomass left to supply them from. When I do the same run with the other models not held static the problem goes away, as the rate at which plants take nutrients from mycorrhizal fungi reduces as nutrients become more scarce
I think this is a problem that could potentially crop up anywhere where a removal rate is defined in one model and passed to another, with herbivory and detritivory being the other examples that spring to mind.
One option for resolving this bug is to make the relevant section of the soil model code more defensive, i.e. to disallow out negative mycorrhizal fungi density. I'm am not sure whether that makes sense though, as a negative value cropping up when the other models aren't held static would be a really good indicator of problems in our models, and a more defensive approach could mask this
The alternative is to just ignore the issue as it is static model issue which absolutely could be fixed through a more sensible choice of initial conditions/static model data input. We probably would want to mention the potential for this sort of error in the docs, and probably mention that the static model is intended as a developer tool so you need to be on the lookout for weirdnesses like that
Anyway (as you can probably tell from the rambling above) I'm not sure which approach makes most sense. If anyone has any thoughts please let me know
When the simulation is run with all models static apart from the soil model the densities of the mycorrhizal fungi get driven to negative values.
This happens because the rate at which plants take nutrients from the mycorrhizal fungi is static, so nutrients are taken from the fungi even if they have no biomass left to supply them from. When I do the same run with the other models not held static the problem goes away, as the rate at which plants take nutrients from mycorrhizal fungi reduces as nutrients become more scarce
I think this is a problem that could potentially crop up anywhere where a removal rate is defined in one model and passed to another, with herbivory and detritivory being the other examples that spring to mind.
One option for resolving this bug is to make the relevant section of the soil model code more defensive, i.e. to disallow out negative mycorrhizal fungi density. I'm am not sure whether that makes sense though, as a negative value cropping up when the other models aren't held static would be a really good indicator of problems in our models, and a more defensive approach could mask this
The alternative is to just ignore the issue as it is static model issue which absolutely could be fixed through a more sensible choice of initial conditions/static model data input. We probably would want to mention the potential for this sort of error in the docs, and probably mention that the static model is intended as a developer tool so you need to be on the lookout for weirdnesses like that
Anyway (as you can probably tell from the rambling above) I'm not sure which approach makes most sense. If anyone has any thoughts please let me know