Commit 223ad2de authored by Ronan Trepos's avatar Ronan Trepos
Browse files

Phenologie: add date of pheno as vars

parent f0b6760b
......@@ -47,6 +47,11 @@ public :
Var TT_A2;
Var PhasePhenoPlante;
Var TT_F1;
Var date_SEMIS;
Var date_CROISSANCEACTIVE;
Var date_FLORAISON;
Var date_MATURATION;
Var date_DESSICATION;
Phenologie(const vle::devs::DynamicsInit& model,
const vle::devs::InitEventList& events) :
......@@ -71,6 +76,12 @@ public :
TT_A2.init(this, "TT_A2", events);
PhasePhenoPlante.init(this, "PhasePhenoPlante", events);
TT_F1.init(this, "TT_F1", events);
date_SEMIS.init(this, "date_SEMIS", events);
date_CROISSANCEACTIVE.init(this, "date_CROISSANCEACTIVE", events);
date_FLORAISON.init(this, "date_FLORAISON", events);
date_MATURATION.init(this, "date_MATURATION", events);
date_DESSICATION.init(this, "date_DESSICATION", events);
TT_A0.init(this, "TT_A0", events);
AP.init(this, "AP", events);
......@@ -97,6 +108,7 @@ public :
&& ( (int)ActionSemis() == 1 ) ){
estimationTTentreSemisEtLevee_casPhaseSemisLeveeSimulee =
pp.date_TT_germination + pp.dHE * zSemis();
date_SEMIS = time;
}
{
if ( ( (int)PhasePhenoPlante(-1) > PHASEPHENOPLANTE_NONSEMEE )
......@@ -196,6 +208,7 @@ public :
} else if ( TT_A2() >= pv.date_TT_E1 ){ // date thermique du stade etoiles atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_CROISSANCEACTIVE ;
date_CROISSANCEACTIVE = time - date_SEMIS();
}
break;
......@@ -206,6 +219,7 @@ public :
throw vle::utils::ModellingError("[Phenologie] Error recolte pendant croissance active");
} else if ( TT_A2() >= pv.date_TT_F1 ){ // date thermique du stade floraison atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_FLORAISON ;
date_FLORAISON = time - date_SEMIS();
}
break;
......@@ -217,6 +231,7 @@ public :
} else if ( TT_A2() >= pv.date_TT_M0 ){ // date thermique du stade fin floraison atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_MATURATION ;
date_MATURATION = time - date_SEMIS();
}
break;
......@@ -232,6 +247,7 @@ public :
// atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_DESSICATION ;
date_DESSICATION = time - date_SEMIS();
}
break;
......
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