private void CalcHourlySVP(double[] hourlytemperature) { // calculates SVP at the air temperature for (int i = 0; i < 24; i++) { SVP.Add(6.1078 * Math.Exp(17.269 * hourlytemperature[i] / (237.3 + hourlytemperature[i])) * 0.1); } }
public HeadPiece() { mySlot = SLOT.HEAD; level = 1; starLevel = 1; rarity = RARITY.GRAY; modifiers = new SVP[6] { new SVP(StatBooster.HPFLAT,1),null,null,null,null,null }; }
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); }
public HeadPiece(int starLevel,RARITY rarity) { if (starLevel <= 6 && starLevel > 0) { int temp = (starLevel * 50) + 25; modifiers[0] = new SVP(StatBooster.HPFLAT,temp); } int rarityHolder = (int)rarity; while (rarityHolder > 0) { //add modifier slots needs to be rabdom rarityHolder--; } }