@@ -2227,6 +2227,8 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
2227
2227
--------
2228
2228
dirint
2229
2229
disc
2230
+ orgill_hollands
2231
+ boland
2230
2232
"""
2231
2233
2232
2234
dni_extra = get_extra_radiation (datetime_or_doy )
@@ -2265,6 +2267,93 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
2265
2267
return data
2266
2268
2267
2269
2270
+ def orgill_hollands (ghi , zenith , datetime_or_doy , dni_extra = None ,
2271
+ min_cos_zenith = 0.065 , max_zenith = 87 ):
2272
+ """Estimate DNI and DHI from GHI using the Orgill and Hollands model.
2273
+
2274
+ The Orgill and Hollands model [1]_ estimates the diffuse fraction DF from
2275
+ global horizontal irradiance through an empirical relationship between
2276
+ hourly DF observations (in Toronto, Canada) and the ratio of GHI to
2277
+ extraterrestrial irradiance, Kt.
2278
+
2279
+ Parameters
2280
+ ----------
2281
+ ghi: numeric
2282
+ Global horizontal irradiance in W/m^2.
2283
+ zenith: numeric
2284
+ True (not refraction-corrected) zenith angles in decimal degrees.
2285
+ datetime_or_doy : int, float, array, pd.DatetimeIndex
2286
+ Day of year or array of days of year e.g.
2287
+ pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex.
2288
+ dni_extra : None or numeric, default None
2289
+ Extraterrestrial direct normal irradiance. [W/m2]
2290
+ min_cos_zenith : numeric, default 0.065
2291
+ Minimum value of cos(zenith) to allow when calculating global
2292
+ clearness index `kt`. Equivalent to zenith = 86.273 degrees.
2293
+ max_zenith : numeric, default 87
2294
+ Maximum value of zenith to allow in DNI calculation. DNI will be
2295
+ set to 0 for times with zenith values greater than `max_zenith`.
2296
+
2297
+ Returns
2298
+ -------
2299
+ data : OrderedDict or DataFrame
2300
+ Contains the following keys/columns:
2301
+
2302
+ * ``dni``: the modeled direct normal irradiance in W/m^2.
2303
+ * ``dhi``: the modeled diffuse horizontal irradiance in
2304
+ W/m^2.
2305
+ * ``kt``: Ratio of global to extraterrestrial irradiance
2306
+ on a horizontal plane.
2307
+
2308
+ References
2309
+ ----------
2310
+ .. [1] Orgill, J.F., Hollands, K.G.T., Correlation equation for hourly
2311
+ diffuse radiation on a horizontal surface, Solar Energy 19(4), pp 357–359,
2312
+ 1977. Eqs. 3(a), 3(b) and 3(c)
2313
+ :doi:`10.1016/0038-092X(77)90006-8`
2314
+
2315
+ See Also
2316
+ --------
2317
+ dirint
2318
+ disc
2319
+ erbs
2320
+ boland
2321
+ """
2322
+ if dni_extra is None :
2323
+ dni_extra = get_extra_radiation (datetime_or_doy )
2324
+
2325
+ kt = clearness_index (ghi , zenith , dni_extra , min_cos_zenith = min_cos_zenith ,
2326
+ max_clearness_index = 1 )
2327
+
2328
+ # For Kt < 0.35, set the diffuse fraction
2329
+ df = 1 - 0.249 * kt
2330
+
2331
+ # For Kt >= 0.35 and Kt <= 0.75, set the diffuse fraction
2332
+ df = np .where ((kt >= 0.35 ) & (kt <= 0.75 ),
2333
+ 1.557 - 1.84 * kt , df )
2334
+
2335
+ # For Kt > 0.75, set the diffuse fraction
2336
+ df = np .where (kt > 0.75 , 0.177 , df )
2337
+
2338
+ dhi = df * ghi
2339
+
2340
+ dni = (ghi - dhi ) / tools .cosd (zenith )
2341
+ bad_values = (zenith > max_zenith ) | (ghi < 0 ) | (dni < 0 )
2342
+ dni = np .where (bad_values , 0 , dni )
2343
+ # ensure that closure relationship remains valid
2344
+ dhi = np .where (bad_values , ghi , dhi )
2345
+
2346
+ data = OrderedDict ()
2347
+ data ['dni' ] = dni
2348
+ data ['dhi' ] = dhi
2349
+ data ['kt' ] = kt
2350
+
2351
+ if isinstance (datetime_or_doy , pd .DatetimeIndex ):
2352
+ data = pd .DataFrame (data , index = datetime_or_doy )
2353
+
2354
+ return data
2355
+
2356
+
2268
2357
def boland (ghi , solar_zenith , datetime_or_doy , a_coeff = 8.645 , b_coeff = 0.613 ,
2269
2358
min_cos_zenith = 0.065 , max_zenith = 87 ):
2270
2359
r"""
@@ -2326,6 +2415,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
2326
2415
dirint
2327
2416
disc
2328
2417
erbs
2418
+ orgill_hollands
2329
2419
2330
2420
Notes
2331
2421
-----
0 commit comments