private void CalcRH(double tMax, double tMin, double RHMax, double RHMin) { // calculate relative humidity double wP; if (RHMax < 0.0 || RHMin < 0.0) { wP = CalcSVP(tMin) / 100 * 1000 * 90; // svp at Tmin } else { wP = (CalcSVP(tMin) / 100 * 1000 * RHMax + CalcSVP(tMax) / 100 * 1000 * RHMin) / 2.0; } for (int i = 0; i < 24; i++) { RH.Add(wP / (10 * SVP[i])); } }