Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve incorrect units in xPLA #2065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Model/Maize/Leaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void Leaf::doRegistrations(void)
scienceAPI.expose("DeltaSLAI", "m2/m2", "Leaf area senescence rate", false, dltSlai);
scienceAPI.expose("TPLA", "m2", "Total plant leaf area", false, tpla);
scienceAPI.expose("SPLA", "m2", "Senesced plant leaf area", false, spla);
scienceAPI.expose("GPLA", "m2", "Green plant leaf area", false, spla);
scienceAPI.expose("GPLA", "m2", "Green plant leaf area", false, gpla);
scienceAPI.expose("LeafNo", "leaves","Number of fully expanded leaves", false, nLeaves);
scienceAPI.expose("FinalLeafNo", "leaves", "Final Leaf Number", false, finalLeafNo);
scienceAPI.expose("LeafGreenWt", "g/m^2", "Live leaf dry weight", false, dmGreen);
Expand Down Expand Up @@ -73,6 +73,7 @@ void Leaf::initialize(void)
dltSlai = 0.0;
tpla = 0.0;
spla= 0.0;
gpla= 0.0;
tplaMax = 0.0;
tplaPot = 0.0;
dltSlaiN = 0.0;
Expand Down Expand Up @@ -236,8 +237,9 @@ void Leaf::updateVars(void)

sLai += dltSlai;
lai -= dltSlai;
tpla = lai / density * 10000;
spla = sLai / density * 10000;
gpla = lai / density * smm2sm;
spla = sLai / density * smm2sm;
tpla = gpla + spla;

dltSlaiN = 0.0;
dltSlai = 0.0;
Expand Down
1 change: 1 addition & 0 deletions Model/Maize/Leaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ namespace Maize {
double tplaPot;
double tpla;
double spla;
double gpla;

// senescence
double sLai;
Expand Down
6 changes: 3 additions & 3 deletions Model/Sorghum/Leaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void Leaf::doRegistrations(void)
scienceAPI.expose("DeltaSlaiWater", "m2/m2", "Senesced leaf area from age", false, dltSlaiWater);
scienceAPI.expose("TPLA", "m2", "Total plant leaf area", false, tpla);
scienceAPI.expose("SPLA", "m2", "Senesced plant leaf area", false, spla);
scienceAPI.expose("GPLA", "m2", "Green plant leaf area", false, spla);
scienceAPI.expose("GPLA", "m2", "Green plant leaf area", false, gpla);
scienceAPI.expose("LeafNo", "leaves","Number of fully expanded leaves", false, nLeaves);
scienceAPI.expose("LeafGreenWt", "g/m^2", "Live leaf dry weight", false, dmGreen);
scienceAPI.expose("LeafSenescedWt", "g/m^2", "Senesced leaf dry weight", false, dmSenesced);
Expand Down Expand Up @@ -200,8 +200,8 @@ void Leaf::updateVars(void)

sLai += dltSlai;
lai -= dltSlai;
gpla = lai / density * 10000;
spla = sLai / density * 10000;
gpla = lai / density * smm2sm;
spla = sLai / density * smm2sm;
tpla = gpla + spla;

SLN = divide(nGreen,lai,0);
Expand Down