Commit e02e8470 authored by Ronan Trepos's avatar Ronan Trepos
Browse files

Frost : update module

Add parzmeter date_fin_GEL.
Integration of work of M. Chanis on Pea.
parent 1beb0de4
......@@ -977,6 +977,9 @@
<port name="AlphaSenesc">
<double>1</double>
</port>
<port name="date_fin_GEL">
<string>9999-12-31</string>
</port>
</condition>
<condition name="cSoil">
<port name="ApportEau_seuil">
......@@ -1329,15 +1332,15 @@
</observable>
<observable name="oFrost">
<port name="Des">
<port name="Des_cumult">
<attachedview name="view"/>
</port>
<port name="Gel">
<port name="indiceGEL_cumul">
<attachedview name="view"/>
</port>
<port name="Gelmax">
<port name="indiceGELmax">
<attachedview name="view"/>
</port>
......@@ -1369,7 +1372,7 @@
<attachedview name="view"/>
</port>
<port name="dGel">
<port name="dindiceGEL">
<attachedview name="view"/>
</port>
......
......@@ -860,6 +860,9 @@
<port name="date_FLO">
<string>2010-04-29</string>
</port>
<port name="date_fin_GEL">
<string>2010-03-31</string>
</port>
</condition>
<condition name="cPlantPea">
<port name="DRG_ET">
......@@ -1353,15 +1356,15 @@
</observable>
<observable name="oFrost">
<port name="Des">
<port name="Des_cumul">
<attachedview name="view"/>
</port>
<port name="Gel">
<port name="indiceGEL_cumul">
<attachedview name="view"/>
</port>
<port name="Gelmax">
<port name="indiceGELmax">
<attachedview name="view"/>
</port>
......@@ -1393,7 +1396,7 @@
<attachedview name="view"/>
</port>
<port name="dGel">
<port name="dindiceGEL">
<attachedview name="view"/>
</port>
......
......@@ -957,7 +957,10 @@
<port name="vRac_ST">
<double>0.800000000000000</double>
</port>
</condition>
<port name="date_fin_GEL">
<string>9999-12-31</string>
</port>
</condition>
<condition name="cSoil">
<port name="ApportEau_seuil">
<double>1.200000000000000</double>
......@@ -1302,15 +1305,15 @@
</observable>
<observable name="oFrost">
<port name="Des">
<port name="Des_cumul">
<attachedview name="view"/>
</port>
<port name="Gel">
<port name="indiceGEL_cumul">
<attachedview name="view"/>
</port>
<port name="Gelmax">
<port name="indiceGELmax">
<attachedview name="view"/>
</port>
......@@ -1342,7 +1345,7 @@
<attachedview name="view"/>
</port>
<port name="dGel">
<port name="dindiceGEL">
<attachedview name="view"/>
</port>
......
......@@ -39,12 +39,16 @@ public:
R.init(this, "R", events);
stressGEL.init(this, "stressGEL", events);
dDes.init(this, "dDes", events);
Des.init(this, "Des", events);
dGel.init(this, "dGel", events);
Gel.init(this, "Gel", events);
Gelmax.init(this, "Gelmax", events);
Des_cumul.init(this, "Des_cumul", events);
dindiceGEL.init(this, "dindiceGEL", events);
indiceGEL_cumul.init(this, "indiceGEL_cumul", events);
indiceGELmax.init(this, "indiceGELmax", events);
NjGel.init(this, "NjGel", events);
stressGEL_cumul.init(this, "stressGEL_cumul", events);
dEnd.init(this, "dEnd", events);
End_cumul.init(this, "End_cumul", events);
pEnd.init(this, "pEnd", events);
pEndmax.init(this, "pEndmax", events);
}
virtual ~Frost()
......@@ -84,13 +88,13 @@ public:
Rpot = pp.Rmin;
}
//Calcul de dR
if(pp.begin_date + j==pp.date_S){
//Calcul de de la variation journaliere de la résistance (degres-jour)
if(pp.begin_date + j<=pp.date_S){
dR = 0;
} else if(Rpot() <= R(-1)){
} else if(Rpot() < R(-1)){
dR =(Rpot()-pp.Rmin)/pp.Njend;
} else {
dR =(pp.Rmin-Rpot()) * Tmoy()/(20.0 * pp.Njdes);
dR =(pp.Rmin-Rmax()) * Tmoy()/(20.0 * pp.Njdes);
}
//Calcul de R la resistance
......@@ -104,57 +108,85 @@ public:
R=std::min((R(-1)+dR()),Rpot());
}
//Calcul du stress ou ecart journalier entre la
//resistance et la temperature minimale dindiceGEL
if(pp.begin_date + j < pp.date_S ) {
dindiceGEL = 0;
} else {
dindiceGEL = std::max(0.0, R() - Tmin());
}
//Calcul de la destruction de la biomasse stressGEL (de 0: pas de stress à 1 : stress TOTAL)
if(pp.begin_date + j <= pp.date_S) {
if((STapLEVEE() == 0) or (pp.begin_date + j >= pp.date_fin_GEL)) {
stressGEL = 1;
} else if (Tmin()>= R()){
stressGEL=1;
} else if((Tmin())<= R()- pp.GELmax_seuil){
stressGEL = 0.0;
} else {
stressGEL= 1.0-(1.0/pp.GELmax_seuil)*(R()-Tmin());
stressGEL= 1.0-(1/ pp.GELmax_seuil)*dindiceGEL();
}
//Calcul du desendurcissement journalier Des
if(R() == 0){
dDes = 0;
} else if (R() > R(-1)){
//Intensité cumulée de stressGEL entre la levée et la date_fin_GEL: cumul de 1-stressGEL
if (STapLEVEE() == 0 ) {
stressGEL_cumul = 0;
} else {
stressGEL_cumul = stressGEL_cumul(-1) + (1-stressGEL()) ;
}
//Calcul du desendurcissement journalier dDes
if (R() > R(-1)){
dDes = R() - R(-1);
} else {
dDes = 0;
}
//Calcul du désendurcissement cumulé
if(R()==0) {
Des=0;
//Calcul du desendurcissement cumule
Des_cumul = dDes() + Des_cumul(-1);
//Calcul de l'endurcissement journalier dEnd (°C)
if (R() < R(-1)){
dEnd = R() - R(-1);
} else {
Des = dDes() + Des(-1);
dEnd = 0;
}
//Calcul du stress ou ecart journalier entre la
//resistance et la temperature minimale dGel
if(pp.begin_date + j < pp.date_S ) {
dGel = 0;
//Calcul de l'endurcissement cumulé End_cumul (°C)
End_cumul = dEnd() + End_cumul(-1);
//Pourcentage d'endurcissement pEnd
if(pp.begin_date + j< pp.date_S){
pEnd= 0;
} else {
dGel = std::max(0.0, R() - Tmin());
pEnd= (R()-pp.Rmin) / (Rmax() -pp.Rmin)*100;
}
//Pourcentage d'endurcissement maximal, pEndmax
if(pp.begin_date + j< pp.date_S){
pEndmax= 0;
} else if (pEnd()>pEndmax(-1)){
pEndmax= pEnd();
} else {
pEndmax=pEndmax(-1);
}
//Calcul du stress cumulé Gel
if(dGel()==0) {
Gel = 0;
if(dindiceGEL()==0) {
indiceGEL_cumul = indiceGEL_cumul(-1);
} else {
Gel = dGel() + Gel(-1);
indiceGEL_cumul = dindiceGEL() + indiceGEL_cumul(-1);
}
//Calcul de l'écart maimum journalier Gelmax
if(dGel()> dGel(-1)){
Gelmax = dGel();
//Calcul de l'écart maimum journalier indiceGELmax
if(dindiceGEL()> indiceGELmax(-1)){
indiceGELmax = dindiceGEL();
} else {
Gelmax = dGel(-1);
indiceGELmax = indiceGELmax(-1);
}
//Calcul du nombre de jours de gel NjGel
if(dGel()>0) {
if(dindiceGEL()>0) {
NjGel = NjGel(-1) + 1;
} else {
NjGel=NjGel(-1);
......@@ -181,12 +213,16 @@ private:
Var R;
Var stressGEL;
Var dDes;
Var Des;
Var dGel;
Var Gel;
Var Gelmax;
Var Des_cumul;
Var dindiceGEL;
Var indiceGEL_cumul;
Var indiceGELmax;
Var NjGel;
Var stressGEL_cumul;
Var dEnd;
Var End_cumul;
Var pEnd ;
Var pEndmax;
};
} // namespace AZODYN
......
......@@ -73,6 +73,9 @@ public:
//couvert est total
double GELmax_seuil;
// date de fin de l'application du gel hivernal
double date_fin_GEL;
//resistance minimale au froid de la plante
double Rmin;
......@@ -185,7 +188,6 @@ public:
//Plante/m²
double densite_semis;
//---------------------------------------------------------------------------------//
// pour remplissage des grains
......@@ -240,6 +242,7 @@ public:
Tmax_plante = Utils::extractDouble(events, "Tmax_plante");
R_Coleo = Utils::extractDouble(events, "R_Coleo");
GELmax_seuil = Utils::extractDouble(events, "GELmax_seuil");
date_fin_GEL = Utils::extractDate(events,"date_fin_GEL");
Rmin = Utils::extractDouble(events, "Rmin");
Tmax_R = Utils::extractDouble(events, "Tmax_R");
Tmin_R = Utils::extractDouble(events, "Tmin_R");
......
......@@ -4,6 +4,6 @@ AZODYN AzodynBarley.vpz view "AzodynBarley:YieldCereal.MSG" 500 10e-4 7.939111
AZODYN AzodynWheat.vpz view "AzodynWheat:WaterSoil.TR_C0" 283 10e-4 1.35998538
AZODYN AzodynWheat.vpz view "AzodynWheat:StressNitrogen.INN" 199 10e-4 0.98430310
AZODYN AzodynWheat.vpz view "AzodynWheat:YieldCereal.NGM2" 286 10e-4 -22959.4785025915
AZODYN AzodynPea.vpz view "AzodynPea:Frost.Gelmax" 172 10e-4 4.76210754
AZODYN AzodynPea.vpz view "AzodynPea:Frost.indiceGELmax" 172 10e-4 4.878174603174
AZODYN AzodynPea.vpz view "AzodynPea:StressNitrogenPea.stressN_Eb" 302 10e-4 0.9990588
AZODYN AzodynPea.vpz view "AzodynPea:YieldPea.Rdt" 355 10e-4 311.4173
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