Loading OpenSimRoot/src/modules/CarbonModule/CarbonAllocation.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -642,6 +642,16 @@ void RootGrowthScalingFactor::calculate(const Time &t,double &scale){ double thrh(1.0);//don't change this a backward compatibility default if(threshold)threshold->get(t-plantingTime,thrh); thrh*=a; //Allow secondary growth to use carbon that is not needed to satisfy the //potential longitudinal growth. This can raise the secondary allocation //above its configured maximum fraction without reducing longitudinal growth. double longitudinalPotential(p-sp); if(longitudinalPotential<0) longitudinalPotential=0; double carbonNotNeededForLongitudinalGrowth(a-longitudinalPotential); if(carbonNotNeededForLongitudinalGrowth>thrh){ thrh=carbonNotNeededForLongitudinalGrowth; } if(thrh>a) thrh=a; if(s>thrh){ s=thrh; msg::warning("RootGrowthScaling Factor: parameter maxCarbonAllocation2SecondaryGrowth limiting secondary growth."); Loading Loading
OpenSimRoot/src/modules/CarbonModule/CarbonAllocation.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -642,6 +642,16 @@ void RootGrowthScalingFactor::calculate(const Time &t,double &scale){ double thrh(1.0);//don't change this a backward compatibility default if(threshold)threshold->get(t-plantingTime,thrh); thrh*=a; //Allow secondary growth to use carbon that is not needed to satisfy the //potential longitudinal growth. This can raise the secondary allocation //above its configured maximum fraction without reducing longitudinal growth. double longitudinalPotential(p-sp); if(longitudinalPotential<0) longitudinalPotential=0; double carbonNotNeededForLongitudinalGrowth(a-longitudinalPotential); if(carbonNotNeededForLongitudinalGrowth>thrh){ thrh=carbonNotNeededForLongitudinalGrowth; } if(thrh>a) thrh=a; if(s>thrh){ s=thrh; msg::warning("RootGrowthScaling Factor: parameter maxCarbonAllocation2SecondaryGrowth limiting secondary growth."); Loading