@@ -244,32 +244,35 @@ def relativeairmass(zenith, model='kastenyoung1989'):
244244 return am
245245
246246
247- def calc_pw (temp_air , relative_humidity ):
247+ def gueymard94_pw (temp_air , relative_humidity ):
248248 """
249249 Calculates precipitable water (cm) from ambient air temperature (C)
250- and relatively humidity (%) using an empirical model [1]. The model
251- was developed by expanding Eq. 1 in [2]:
250+ and relatively humidity (%) using an empirical model [1-3]. The
251+ accuracy of this method is approximately 20% for moderate PW (1-3
252+ cm) and less accurate otherwise.
253+
254+ The model was developed by expanding Eq. 1 in [2]:
252255 .. math::
253256
254257 w = 0.1 H_v \r ho_v
255258
256259 using Eq. 2 in [2]
257260 .. math::
258261
259- \r ho_v = 216.7 RH/T e_s
262+ \r ho_v = 216.7 R_H e_s /T
260263
261264 H_v is the apparant water vapor scale height (km). The expression
262265 for H_v is Eq. 4 in [2]:
263266 .. math::
264267
265268 H_v = 0.4976 + 1.5265*T/273.15 + exp(13.6897*T/273.15 - 14.9188*(T/273.15)^3)
266269
267- \r ho_v is the surface water vapor density (g/m^3). In the
268- expression \r ho_v, e_s is the saturation water vapor pressure
269- (millibar). The expression for e_s is Eq. 1 in [3]
270+ \r ho_v is the surface water vapor density (g/m^3). In the expression
271+ \r ho_v, e_s is the saturation water vapor pressure (millibar). The
272+ expression for e_s is Eq. 1 in [3]
270273 .. math::
271274
272- e_s = exp(22.330 - 49.140*(100. /T) - 10.922*(100. /T). ^2 - 0.39015*T/100)
275+ e_s = exp(22.330 - 49.140*(100/T) - 10.922*(100/T)^2 - 0.39015*T/100)
273276
274277 Parameters
275278 ----------
@@ -296,17 +299,17 @@ def calc_pw(temp_air, relative_humidity):
296299 1294-1300.
297300 """
298301
299- T = temp_air + 273.15 # Convert to Kelvin
302+ T = temp_air + 273.15 # Convert to Kelvin
300303 RH = relative_humidity
301304
302- #RH[RH>100 | RH<=0] = NaN; #Filter RH for unreasonable Values
305+ theta = T / 273.15
303306
304307 # Eq. 1 from Keogh and Blakers
305- pw = ( 0.1 *
306- ( 0.4976 + 1.5265 * T / 273.15 +
307- np .exp (13.6897 * T / 273.15 - 14.9188 * (T / 273.15 )** 3 )) *
308- (216.7 * RH / (100. * T )* np .exp (22.330 - 49.140 * (100. / T ) -
309- 10.922 * (100. / T )** 2 - 0.39015 * T / 100 )))
308+ pw = (
309+ 0.1 *
310+ ( 0.4976 + 1.5265 * theta + np .exp (13.6897 * theta - 14.9188 * (theta )** 3 )) *
311+ (216.7 * RH / (100 * T )* np .exp (22.330 - 49.140 * (100 / T ) -
312+ 10.922 * (100 / T )** 2 - 0.39015 * T / 100 )))
310313
311314 pw = np .maximum (pw , 0.1 )
312315
@@ -326,8 +329,9 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
326329 function:
327330
328331 .. math::
329- M = coeff(1) + coeff(2)*AMa + coeff(3)*Pwat + coeff(4)*AMa^.5
330- + coeff(5)*Pwat^.5 + coeff(6)*AMa/Pwat
332+
333+ M = c_1 + c_2*AMa + c_3*Pwat + c_4*AMa^.5
334+ + c_5*Pwat^.5 + c_6*AMa/Pwat
331335
332336 Default coefficients are determined for several cell types with
333337 known quantum efficiency curves, by using the Simple Model of the
0 commit comments