Commit e3e215e3 authored by Ronan Trépos's avatar Ronan Trépos
Browse files

updated linear model for oil content:

 [@Andrianasolo2014]
parent 6500a45b
This diff is collapsed.
......@@ -83,6 +83,7 @@ public :
Var FNLE;
Var FNIRUE;
Var INN;
Var vNabs;
Var Nabs;
Var vMine;
......@@ -206,6 +207,7 @@ public :
FNLE.init(this, "FNLE", events);
FNIRUE.init(this, "FNIRUE", events);
INN.init(this, "INN", events);
vNabs.init(this, "vNabs", events);
Nabs.init(this, "Nabs", events);
vMine.init(this, "vMine", events);
CCN.init(this, "CCN", events);
......@@ -269,7 +271,7 @@ public :
}
FHN = FHN_tmp;
}
vNabs = 0.0;
vMine = ps.Vp * FHN() * FTHN();
vDenit = 6.0 * exp( 0.07738 * /*replace Tmoy() by 0*/0 - 6.593);
FE = 0.0;
......@@ -527,11 +529,8 @@ public :
//Traitement traitementPlantNabsorption
//inclus dans le paragraphe "2.2.4. Nitrogen" de la publi
{
double ddt = 0.0;
ddt = vMF(-1) + vAA(-1);
Nabs = Nabs(-1) + ddt;
}
vNabs = vMF(-1) + vAA(-1);
Nabs = Nabs(-1) + vNabs();
{
double Ea_tmp = 0.0;
......@@ -703,7 +702,12 @@ public :
} else {
INN_tmp = Nabs() / Ncrit();
}
INN = INN_tmp;
if (INN_tmp > 2.0) {
INN = 2.0;
} else {
INN = INN_tmp;
}
}
{
double FNLE_tmp = 0.0;
......
......@@ -26,66 +26,73 @@ class ElaborationQualite : public DiscreteTimeDyn
public :
ParametresVariete pv;
double densite;
bool first_compute;
/*Sync*/ Var PhasePhenoPlante;
/*Sync*/ Var ChgtPhasePhenoPlante;
/*Sync*/ Var TT_A2;
/*Sync*/ Var TT_F1;
/*Sync*/ Var Tx;
/*Sync*/ Var Eb;
/*Sync*/ Var LAI;
/*Sync*/ Var FTSW;
/*Sync*/ Var JSM;
/*Sync*/ Var photo_INN_CROISSANCEACTIVE_A_FLORAISON;
/*Sync*/ Var iPAR;
/*Sync*/ Var Nabs;
/*Sync*/ Var INN;
/*Sync*/ Var vNabs;
/// # Teneur en huile (0%), modèle linéaire [Casadebaig2008]
/// Teneur en huile (0%), modèle linéaire [Casadebaig2008]
Var TH;
// duration of reproductive phase
Var D_MH;
// sum of RUE on reproductive phase
Var SRUE_MH;
// Water deficit
Var SFTSW_FIM;
Var SFTSW_MH;
/// # Durée de surface foliaire post-floraison
Var DSF;
/// # Somme de rayonnement intercepté [E1 - F1]
Var siPAR0;
/// # Somme de rayonnement intercepté [F1+250 - F1+450]
Var siPAR1;
/// # Somme de rayonnement intercepté [F1 - F1+600]
Var siPAR2;
/// # Somme de rayonnement intercepté [F1 - M3]
Var siPAR3;
/// # Somme d'azote absorbé [E1 - F1]
Var Nabs0;
// Nitrogen deficit
Var SNNIE_FIH;
Var NAB_MH;
// Thermal stress
Var NHT34_MH;
// Crop functionning
Var LAD_MH;
Var MRUE_MH;
/// Capture de TH a un instant donne
Var photo_TH_aFinMATURATION;
ElaborationQualite(const vle::devs::DynamicsInit& model,
const vle::devs::InitEventList& events) :
DiscreteTimeDyn(model, events)
{
pv.initialiser(events);
densite = events.getDouble("densite");
first_compute = true;
PhasePhenoPlante.init(this, "PhasePhenoPlante", events);
ChgtPhasePhenoPlante.init(this, "ChgtPhasePhenoPlante", events);
TT_A2.init(this, "TT_A2", events);
TT_F1.init(this, "TT_F1", events);
Tx.init(this, "Tx", events);
Eb.init(this, "Eb", events);
LAI.init(this, "LAI", events);
FTSW.init(this, "FTSW", events);
JSM.init(this, "JSM", events);
photo_INN_CROISSANCEACTIVE_A_FLORAISON.init(this,
"photo_INN_CROISSANCEACTIVE_A_FLORAISON", events);
iPAR.init(this, "iPAR", events);
INN.init(this, "INN", events);
vNabs.init(this, "vNabs", events);
Nabs.init(this, "Nabs", events);
TH.init(this, "TH" , events);
DSF.init(this, "DSF" , events);
siPAR0.init(this, "siPAR0" , events);
siPAR1.init(this, "siPAR1" , events);
siPAR2.init(this, "siPAR2" , events);
siPAR3.init(this, "siPAR3" , events);
Nabs0.init(this, "Nabs0" , events);
D_MH.init(this, "D_MH" , events);
SRUE_MH.init(this, "SRUE_MH" , events);
SFTSW_FIM.init(this, "SFTSW_FIM" , events);
SFTSW_MH.init(this, "SFTSW_MH" , events);
SNNIE_FIH.init(this, "SNNIE_FIH" , events);
NAB_MH.init(this, "NAB_MH" , events);
NHT34_MH.init(this, "NHT34_MH.init" , events);
LAD_MH.init(this, "LAD_MH" , events);
MRUE_MH.init(this, "MRUE_MH" , events);
photo_TH_aFinMATURATION.init(this, "photo_TH_aFinMATURATION" , events);
}
......@@ -96,92 +103,159 @@ public :
if (first_compute) {
first_compute = false;
TH = 0.0;
DSF = 0.0; //codeMMpourMemo Initial Value = 0.0
siPAR0 = 0.0; //codeMMpourMemo Initial Value = 0.0
siPAR1 = 0.0; //codeMMpourMemo Initial Value = 0.0
siPAR2 = 0.0; //codeMMpourMemo Initial Value = 0.0
siPAR3 = 0.0; //codeMMpourMemo Initial Value = 0.0
Nabs0 = 0.0; //codeMMpourMemo Initial Value = 0.0
D_MH = 0.0;
SRUE_MH = 0.0;
SFTSW_FIM = 0.0;
SFTSW_MH = 0.0;
SNNIE_FIH = 0.0;
NAB_MH = 0.0;
NHT34_MH = 0.0;
LAD_MH = 0.0;
MRUE_MH = 0.0;
photo_TH_aFinMATURATION = 0.0;
} else {
// calcul de D_MH
{
double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else {
ddt = 1;
}
D_MH = D_MH(-1) + ddt;
}
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_FLORAISON )
// calcul de SRUE_MH
{
double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE ) ){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else {
ddt = LAI();
ddt = Eb();
}
DSF = DSF(-1) + ddt;
SRUE_MH = SRUE_MH(-1) + ddt;
}
// calcul de siPAR0
// calcul de MRUE_MH
MRUE_MH = SRUE_MH() / D_MH();
// calcul de NHT34_MH
{
double ddt = 0.0;
if ( ( TT_A2() >= (pv.date_TT_F1) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
if ( Tx() < 34.0 ){
ddt = 0.0;
} else if ( ( TT_A2() >= (pv.date_TT_E1) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
ddt = iPAR();
} else {
} else if (( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){
// traduit condition TT_A2 > date_TT_M3
ddt = 0.0;
} else {
ddt = 1.0;
}
siPAR0 = siPAR0(-1) + ddt;
NHT34_MH = NHT34_MH(-1) + ddt;
}
// calcul de siPAR1
// calcul de SFTSW_FIM
{
double ddt = 0.0;
if ( ( TT_A2() >= (pv.date_TT_F1 + 450.0) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
if ( ( PhasePhenoPlante() > PHASEPHENOPLANTE_FLORAISON )
// traduit condition TT_A2 > date_TT_M0
|| ( PhasePhenoPlante() <= PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else if ( ( TT_A2() >= (pv.date_TT_F1 + 250.0) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
ddt = iPAR();
} else {
ddt = 0.0;
ddt = 1.0 - FTSW();
}
siPAR1 = siPAR1(-1) + ddt;
SFTSW_FIM = SFTSW_FIM(-1) + ddt;
}
// calcul de SFTSW_MH
{
double ddt = 0.0;
if ( ( TT_A2() >= (pv.date_TT_F1 + 600.0) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else if ( ( PhasePhenoPlante() >= PHASEPHENOPLANTE_FLORAISON)
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
ddt = iPAR();
} else {
ddt = 1.0 - FTSW();
}
SFTSW_MH = SFTSW_MH(-1) + ddt;
}
// calcul de SNNIE_FIH
{
double ddt = 0.0;
if ( INN() <= 1.0 ){
ddt = 0.0;
} else if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_CROISSANCEACTIVE )
// traduit condition TT_A2 < date_TT_E1
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else {
ddt = INN() - 1.0 ;
}
siPAR2 = siPAR2(-1) + ddt;
SNNIE_FIH = SNNIE_FIH(-1) + ddt;
}
// calcul de NAB_MH
{
double ddt = 0.0;
if ( ( TT_A2() >= (pv.date_TT_M3) )
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE ) ){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else if ( ( PhasePhenoPlante() >= PHASEPHENOPLANTE_FLORAISON)
&& ( PhasePhenoPlante() < PHASEPHENOPLANTE_RECOLTEE) ){
ddt = iPAR();
} else {
ddt = vNabs();
}
NAB_MH = NAB_MH(-1) + ddt;
}
// calcul de LAD_MH
{
double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE ) ){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else {
ddt = LAI();
}
siPAR3 = siPAR3(-1) + ddt;
LAD_MH = LAD_MH(-1) + ddt;
}
{
double TH_tmp = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_FLORAISON )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE) ){
TH_tmp = 0.0;
} else {
TH_tmp = -0.86989 +0.04707*DSF() -0.00335*siPAR1()
-0.09904*JSM() -0.02009*Nabs() +0.00562*pv.date_TT_M3
+0.71730*pv.thp +5.67231*pv.ext;
TH_tmp = -18.70 + 0.996 * pv.thp + 0.111 * SFTSW_FIM()
+ 0.126 * SFTSW_MH() - 0.068 * SNNIE_FIH()
- 0.036 * NAB_MH() - 0.236 * NHT34_MH()
+ 0.007 * LAD_MH() + 21.053 * MRUE_MH()
+ 0.832 * densite;
}
TH = TH_tmp;
......
sunflo sunflo_simple.vpz viewStatic "sunflo,sunflo_bio,performances:elaboration_qualite.photo_TH_aFinMATURATION" 1 10e-5 52.36044
sunflo sunflo_simple.vpz viewStatic "sunflo,sunflo_bio,performances:elaboration_qualite.photo_TH_aFinMATURATION" 1 10e-5 52.3059793054351
sunflo sunflo_simple.vpz viewStatic "sunflo,sunflo_bio,performances:elaboration_rendement.photo_RDT_aFinMATURATION" 1 10e-5 25.0046
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment