Loading OpenSimRoot/src/modules/CarbonModule/CarbonSources.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,11 @@ CarbonAvailableForGrowth::CarbonAvailableForGrowth(SimulaDynamic* pSD):Derivativ if(!respirationSimulator) msg::warning("CarbonAvailableForGrowth: Respiration is not simulated - assuming it is 0"); //Subtract exudates and other costs carbonCostOfExudates=pSD->existingSibling("rootCarbonCosts","g"); if(!carbonCostOfExudates) carbonCostOfExudates=pSD->existingSibling("rootCarbonCostOfExudates","g"); //rate = g/day if(!carbonCostOfExudates) msg::warning("CarbonAvailableForGrowth: plantCarbonCost(OfExudates) not found. Not including the costs. "); if(!carbonCostOfExudates) { carbonCostOfExudates=pSD->existingSibling("rootCarbonCostOfExudates","g"); //rate = g/day msg::warning("CarbonAvailableForGrowth: did not found rootCarbonCosts, only considering rootCarbonCostOfExudates"); } if(!carbonCostOfExudates) msg::warning("CarbonAvailableForGrowth: rootCarbonCost(OfExudates) not found. Not including the costs. "); //set limit if storage/reserves is available storage=pSD->existingSibling("carbonReserves","g"); //rate = g/day starchSim = pSD->existingSibling("CinSugarForStorageRoots", "g"); // in gram C in starch Loading @@ -92,12 +95,12 @@ void CarbonAvailableForGrowth::calculate(const Time &t,double &c){ } //carbon going to reserves if(storage){ storage->getRate(t,r3); storage->getRate(t,r3);// this is c-r1-r2-r4-plantPotentialCarbonSinkForGrowth+storagelimitor } if(starchSim){ starchSim->getRate(t,r4); } c-=(r1+r2+r3+r4); c-=(r1+r2+r3+r4);//c-r1-r2-r4-(c-r1-r2-r4-plantPotentialCarbonSinkForGrowth+storagelimitor)=plantPotentialCarbonSinkForGrowth+storagelimitor //check if respiration is higher than income rate Loading Loading
OpenSimRoot/src/modules/CarbonModule/CarbonSources.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,11 @@ CarbonAvailableForGrowth::CarbonAvailableForGrowth(SimulaDynamic* pSD):Derivativ if(!respirationSimulator) msg::warning("CarbonAvailableForGrowth: Respiration is not simulated - assuming it is 0"); //Subtract exudates and other costs carbonCostOfExudates=pSD->existingSibling("rootCarbonCosts","g"); if(!carbonCostOfExudates) carbonCostOfExudates=pSD->existingSibling("rootCarbonCostOfExudates","g"); //rate = g/day if(!carbonCostOfExudates) msg::warning("CarbonAvailableForGrowth: plantCarbonCost(OfExudates) not found. Not including the costs. "); if(!carbonCostOfExudates) { carbonCostOfExudates=pSD->existingSibling("rootCarbonCostOfExudates","g"); //rate = g/day msg::warning("CarbonAvailableForGrowth: did not found rootCarbonCosts, only considering rootCarbonCostOfExudates"); } if(!carbonCostOfExudates) msg::warning("CarbonAvailableForGrowth: rootCarbonCost(OfExudates) not found. Not including the costs. "); //set limit if storage/reserves is available storage=pSD->existingSibling("carbonReserves","g"); //rate = g/day starchSim = pSD->existingSibling("CinSugarForStorageRoots", "g"); // in gram C in starch Loading @@ -92,12 +95,12 @@ void CarbonAvailableForGrowth::calculate(const Time &t,double &c){ } //carbon going to reserves if(storage){ storage->getRate(t,r3); storage->getRate(t,r3);// this is c-r1-r2-r4-plantPotentialCarbonSinkForGrowth+storagelimitor } if(starchSim){ starchSim->getRate(t,r4); } c-=(r1+r2+r3+r4); c-=(r1+r2+r3+r4);//c-r1-r2-r4-(c-r1-r2-r4-plantPotentialCarbonSinkForGrowth+storagelimitor)=plantPotentialCarbonSinkForGrowth+storagelimitor //check if respiration is higher than income rate Loading