示例#1
0
 private void CalcVPDeq()
 {
     for (int i = 0; i < 24; i++)
     {
         double PAR = (hRadn[i] * 2.02 / 3600 * 1e6);
         VPDeq.Add(VPDairLeaf[i] * Math.Max(0.0, Math.Min(PAR / 500.0, 1.0)));
     }
 }
示例#2
0
        public double calcLER(double[] hourlyTemperature, double[] deltaTTCanopyHourly, double Tmax, double Tmin, double radN, double sumTTFromSowing, double profileSwAvailRatio, double calc3cmWC)
        {
            //clear LER variables
            hRadn.Clear();
            SVP.Clear();
            RH.Clear();
            VPDair.Clear();
            TLeaf.Clear();
            VPDairLeaf.Clear();
            VPDeq.Clear();
            hLER.Clear();

            // daily calculation of elongation rate given environment and genetic factors
            // LER = (Tleaf - T0)(A + b * VPDair-leaf -c * T)
            // need hourly values

            calcHourlyWeatherVars(Latitude, base.CurrentDate.DayOfYear, radN, Tmax, Tmin, hourlyTemperature);

            // double psi;
            double psi = CalcPsi(profileSwAvailRatio);

            // -------------------------------------------------------
            // [Seb L.] :

            // calculate TLeaf + SEB L. ==> Tapex != Tair !!!
            // The same CalcTLeaf is used to get the impact of SWC in the first layer !

            // With this we define the number of leaves (tip) of today :
            double Ntip = atip * sumTTFromSowing + Leaf_tip_emerg; /////////////// /////////////////////LEAFNUMBER

            // We calculate with a function based also on the number of leaves :
            CalcTApex(hourlyTemperature, calc3cmWC, Ntip);

            // calculate VPDair-leaf with final TLeaf corrected :
            CalcVPDairLeaf(hourlyTemperature);

            // calculate VPDeq
            CalcVPDeq();

            // calculate hLER
            CalcHLER(deltaTTCanopyHourly, LERa, LERb, LERc, psi);

            double dailyLER = 0;

            for (int i = 0; i < 24; i++)
            {
                dailyLER += hLER[i];
            }

            return(dailyLER / 24.0);
        }