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

Fixed N sink strength calculation

parent 9d4a603e
Branches
No related tags found
No related merge requests found
Name: SimpleSoilModule .rgg Name: images/4207522-tulip-flower-hd-wide.png
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: image/png
Name: images/ear2bw.png Name: images/quinoa.png
Content-Type: image/png Content-Type: image/png
Name: parameters6.rgg Name: images/sunflower_front.png
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: image/png
Name: parameters12.rgg Name: project.gs
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: application/x-grogra-registry+xml
Name: parameters5.rgg Name: photosynthesis.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters13.rgg Name: parameters11.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: modules_base.rgg Name: parameters1.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/ear2.png Name: graph.xml
Content-Type: image/png Content-Type: application/x-grogra-graph+xml
Name: parameters.rgg Name: parameters12.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters0.rgg Name: parameters3.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: graph.xml Name: updates.rgg
Content-Type: application/x-grogra-graph+xml Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: modules_light.rgg Name: images/sunflower_back1.png
Content-Type: image/png
Name: parameters4.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters5.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters2.rgg Name: parameters2.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/tassel1.png Name: images/ear11.png
Content-Type: image/png Content-Type: image/png
Name: parameters9.rgg Name: main.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/ear11.png Name: parameters7.rgg
Content-Type: image/png Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: RootModule.rgg Name: RootModule.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters1.rgg Name: initiation.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters8.rgg Name: parameters6.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters10.rgg Name: rewrites.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters3.rgg Name: parameters10.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: modules_organs.rgg Name: modules_light.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: updates.rgg Name: parameters14.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/4207522-tulip-flower-hd-wide.png Name: images/ear2.png
Content-Type: image/png Content-Type: image/png
Name: images/sunflower_front.png Name: images/ear2bw.png
Content-Type: image/png Content-Type: image/png
Name: images/Closed-tulip-buds.png Name: parameters0.rgg
Content-Type: image/png Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/stripes.png Name: modules_organs.rgg
Content-Type: image/png Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: rewrites.rgg Name: modules_base.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: environment.rgg Name: parameters13.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: project.gs Name: SimpleSoilModule .rgg
Content-Type: application/x-grogra-registry+xml Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: main.rgg Name: parameters9.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/ear2red.png Name: images/ear2red.png
Content-Type: image/png Content-Type: image/png
Name: parameters4.rgg Name: images/stripes.png
Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/ear1.png
Content-Type: image/png Content-Type: image/png
Name: photosynthesis.rgg Name: environment.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: initiation.rgg Name: parameters8.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: parameters7.rgg Name: images/tassel1.png
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: image/png
Name: parameters11.rgg Name: parameters.rgg
Content-Type: text/x-grogra-rgg; charset=windows-1252 Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/sunflower_back1.png Name: images/ear1.png
Content-Type: image/png Content-Type: image/png
Name: parameters14.rgg Name: images/Closed-tulip-buds.png
Content-Type: text/x-grogra-rgg; charset=windows-1252
Name: images/quinoa.png
Content-Type: image/png Content-Type: image/png
This diff is collapsed.
...@@ -218,6 +218,10 @@ module PlantBase extends Null ...@@ -218,6 +218,10 @@ module PlantBase extends Null
if (nrSinks > 0) { if (nrSinks > 0) {
reservePool = 0; reservePool = 0;
} }
}
double calcNSourceStrength()
{
// for nitrogen // for nitrogen
double targetNstem = 0.01*biomStem/1000; // 1% of stem biomass should be N (now maize specific; to be made species parameters) double targetNstem = 0.01*biomStem/1000; // 1% of stem biomass should be N (now maize specific; to be made species parameters)
double newNstem = targetNstem - Nstem; // how amount of new N the stem needs to satisfy the target double newNstem = targetNstem - Nstem; // how amount of new N the stem needs to satisfy the target
...@@ -228,9 +232,9 @@ module PlantBase extends Null ...@@ -228,9 +232,9 @@ module PlantBase extends Null
double newNgrain = targetNgrain - Ngrain; double newNgrain = targetNgrain - Ngrain;
Ngrain += newNgrain; Ngrain += newNgrain;
Nsource -= newNgrain; Nsource -= newNgrain;
} }
// calculate plant sink strength based on organ sink strengths // calculate plant sink strength based on organ sink strengths
double calcSinkStrength() double calcSinkStrength()
{ {
...@@ -250,7 +254,10 @@ module PlantBase extends Null ...@@ -250,7 +254,10 @@ module PlantBase extends Null
} else { } else {
sr = 1; // is functional == false, height growth and branching are not regulated by sr anymore sr = 1; // is functional == false, height growth and branching are not regulated by sr anymore
} }
}
double calcNSinkStrength()
{
//for nitrogen //for nitrogen
if (rootModule == true) { if (rootModule == true) {
Nsink = sum((* v:VisibleOrgan, (v.plantNumber == plantNumber) *)[DLN]); Nsink = sum((* v:VisibleOrgan, (v.plantNumber == plantNumber) *)[DLN]);
......
...@@ -205,6 +205,7 @@ module VisibleOrgan extends GrowingOrgan ...@@ -205,6 +205,7 @@ module VisibleOrgan extends GrowingOrgan
} else { } else {
relativeNSinkStrength = DLN / pb[Nsink]; relativeNSinkStrength = DLN / pb[Nsink];
} }
println(relativeNSinkStrength);
double NAvailable = relativeNSinkStrength * pb[Nsource]; double NAvailable = relativeNSinkStrength * pb[Nsource];
/* if (area>0) { /* if (area>0) {
println("DLN = "+DLN); println("DLN = "+DLN);
...@@ -239,12 +240,6 @@ module VisibleOrgan extends GrowingOrgan ...@@ -239,12 +240,6 @@ module VisibleOrgan extends GrowingOrgan
Thornley model = new Thornley(); Thornley model = new Thornley();
photosynthesisRate = model.calc(absm2,Amax,eff[species]); photosynthesisRate = model.calc(absm2,Amax,eff[species]);
} else { } else {
if (rootModule == false) {
calcNitrogen();
} else {
calcNitrogenDemand();
calcNitrogenAllocation();
}
YinC3 modelC3 = new YinC3(); YinC3 modelC3 = new YinC3();
YinC4 modelC4 = new YinC4(); YinC4 modelC4 = new YinC4();
double[] output; double[] output;
......
...@@ -20,7 +20,7 @@ static boolean writeFieldTable = true; // true: write field-level tables ...@@ -20,7 +20,7 @@ static boolean writeFieldTable = true; // true: write field-level tables
static boolean writeLight = false; // true: record tile and sensor light variable (only for plant-independent tiles) static boolean writeLight = false; // true: record tile and sensor light variable (only for plant-independent tiles)
// field parameters // field parameters
static int[] speciesSequence = {cereal}; // sequence of species in adjacent strips (nr of values determines nr of strips) static int[] speciesSequence = {maize}; // sequence of species in adjacent strips (nr of values determines nr of strips)
static double stripDistance = 0; // extra distance between adjacent strips (THIS EXTRA AREA IS NOT INCLUDED IN THE CALCULATION OF STRIP BIOMASS OR YIELD) static double stripDistance = 0; // extra distance between adjacent strips (THIS EXTRA AREA IS NOT INCLUDED IN THE CALCULATION OF STRIP BIOMASS OR YIELD)
// checkerboard // checkerboard
static boolean checker = false; // true: primary species is placed in a checkerboard design with a second species (checkerSpecies) static boolean checker = false; // true: primary species is placed in a checkerboard design with a second species (checkerSpecies)
......
...@@ -4,8 +4,8 @@ import static parameters.*; ...@@ -4,8 +4,8 @@ import static parameters.*;
{ {
// field parameters // field parameters
nrRows[cereal] = 5; // number of rows nrRows[cereal] = 2; // number of rows
nrPlants[cereal] = 8; // number of plants in a row nrPlants[cereal] = 4; // number of plants in a row
rowDistance[cereal] = 0.15; // distance between rows rowDistance[cereal] = 0.15; // distance between rows
plantDistance[cereal] = 0.05; // distance between plants in a row plantDistance[cereal] = 0.05; // distance between plants in a row
delay[cereal] = 0; // germination delay after start of simulation (in days, to represent late sowing) delay[cereal] = 0; // germination delay after start of simulation (in days, to represent late sowing)
......
...@@ -4,10 +4,10 @@ import static parameters.*; ...@@ -4,10 +4,10 @@ import static parameters.*;
{ {
// field parameters // field parameters
nrRows[maize] = 2; // number of rows nrRows[maize] = 1; // number of rows
nrPlants[maize] = 6; // number of plants in a row nrPlants[maize] = 1; // number of plants in a row
rowDistance[maize] = 0.5; // distance between rows rowDistance[maize] = 0.5; // distance between rows
plantDistance[maize] = 0.5; // distance between plants in a row plantDistance[maize] = 0.2; // distance between plants in a row
delay[maize] = 0; // germination delay after start of simulation (in days, to represent late sowing) delay[maize] = 0; // germination delay after start of simulation (in days, to represent late sowing)
harvest[maize] = 95; // duration, i.e. harvest/removal time after emergence (in days) harvest[maize] = 95; // duration, i.e. harvest/removal time after emergence (in days)
hexa[maize] = false; // true: hexagonal layout, rectangular otherwise hexa[maize] = false; // true: hexagonal layout, rectangular otherwise
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -32,6 +32,33 @@ static void renew() ...@@ -32,6 +32,33 @@ static void renew()
o.calcAge(); o.calcAge();
} }
// calculate nitrogen level (no roots) or demand (roots)
v:VisibleOrgan ::>
{
if (rootModule == false) {
v.calcNitrogen();
} else {
v.calcNitrogenDemand();
}
}
// calculate plant nitrogen sink and source strength
pb:PlantBase ::>
{
pb.calcNSinkStrength();
pb.calcNSourceStrength();
}
// calculate allocation of nitrogen to photosynthesizing organ
v:VisibleOrgan::>
{
if(rootModule==true)
{
v.calcNitrogenAllocation();
}
}
// calculate sink strength for all growing organs // calculate sink strength for all growing organs
g:GrowingOrgan ::> g:GrowingOrgan ::>
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment