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