private void CalcVPDair(double[] hourlyTemperature) { for (int i = 0; i < 24; i++) { VPDair.Add(0.6106 * (Math.Exp((17.27 * hourlyTemperature[i]) / (hourlyTemperature[i] + 237.3)) - RH[i] / 100 * Math.Exp((17.27 * hourlyTemperature[i]) / (hourlyTemperature[i] + 237.3)))); } }
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); }