Skip to content
Snippets Groups Projects
Commit d2d7c82f authored by Evers, Jochem's avatar Evers, Jochem
Browse files

Small bug fixes in new root model

parent e4a796d7
Branches
Tags
No related merge requests found
...@@ -74,6 +74,7 @@ module RootBase extends GrowingOrgan ...@@ -74,6 +74,7 @@ module RootBase extends GrowingOrgan
void Bleed(PlantBase pb) { void Bleed(PlantBase pb) {
double r = growth>sumGrowth ? growth-sumGrowth : 0; double r = growth>sumGrowth ? growth-sumGrowth : 0;
pb.reservePool += r; pb.reservePool += r;
growth -= r;
} }
void Uptake() { void Uptake() {
...@@ -336,7 +337,7 @@ module PrimaryRootOrgan extends GrowingRootOrgan ...@@ -336,7 +337,7 @@ module PrimaryRootOrgan extends GrowingRootOrgan
void calcGrowth(RootBase RS) { void calcGrowth(RootBase RS) {
//C allocated to radial growth //C allocated to radial growth
double C = potGrowth>0 && RS.sumGrowth>0 ? (pRoot/potGrowth)*RS.growth * potGrowth/RS.sumGrowth : 0; double C = RS.sumGrowth>0 ? Math.min(potGrowth, RS.growth * potGrowth/RS.sumGrowth) : 0;
biomass += C; biomass += C;
radius = Math.sqrt(biomass/(length*Math.PI*RTD[species]*1e6)); radius = Math.sqrt(biomass/(length*Math.PI*RTD[species]*1e6));
...@@ -386,7 +387,7 @@ module SecondaryRootOrgan extends ExtendingRootOrgan ...@@ -386,7 +387,7 @@ module SecondaryRootOrgan extends ExtendingRootOrgan
void calcGrowth(RootBase RS) { void calcGrowth(RootBase RS) {
//C allocated to fine root growth //C allocated to fine root growth
double C = potGrowth>0 && RS.sumGrowth>0 ? (pRoot/potGrowth)*RS.growth * potGrowth/RS.sumGrowth : 0; double C = RS.sumGrowth>0 ? Math.min(potGrowth, RS.growth * potGrowth/RS.sumGrowth) : 0;
biomass += C; biomass += C;
FineRootBiomass += C; FineRootBiomass += C;
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment