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

Grain nitrogen concentrogen #8855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 19 additions & 1 deletion Models/PMF/Organs/ReproductiveOrgan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,25 @@ public double MinNconc
{
get
{
return MinimumNConc.Value();
// Biomass allocation today
double dmAllocation = potentialDMAllocation.Storage +
potentialDMAllocation.Structural +
potentialDMAllocation.Metabolic;
// Required the minimum nitrogen content according to biomass at the end of day
// and minimum nitrogen concentration
double requiredMinNContent = (Live.Wt + dmAllocation) * MinimumNConc.Value();
// "requiredMinNContent - Live.N" is the deficit of nitrogen in grain.
// Negative: enough nitrogen for grain
// Positive: no enough nitrogen for grain
// (requiredMinNContent - Live.N) / dmAllocation: Convert to nitrogen concentration
// 0.00001: A small value for minimum nitrogen concentration which cannot
// be zero in the arbitration model
double minNConc = 0.00001;
if (dmAllocation > 0)
{
minNConc = Math.Max(0.00001, (requiredMinNContent - Live.N) / dmAllocation);
}
return minNConc;
}
}

Expand Down