@@ -1614,7 +1614,12 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1614
1614
return ghi
1615
1615
1616
1616
1617
- def clearsky_index (ghi , clearsky_ghi , max_clearsky_index = 2.0 ):
1617
+ @renamed_kwarg_warning (
1618
+ since = '0.11.2' ,
1619
+ old_param_name = 'clearsky_ghi' ,
1620
+ new_param_name = 'ghi_clear' ,
1621
+ removal = "0.13.0" )
1622
+ def clearsky_index (ghi , ghi_clear , max_clearsky_index = 2.0 ):
1618
1623
"""
1619
1624
Calculate the clearsky index.
1620
1625
@@ -1626,9 +1631,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1626
1631
ghi : numeric
1627
1632
Global horizontal irradiance. [Wm⁻²]
1628
1633
1629
- clearsky_ghi : numeric
1634
+ ghi_clear : numeric
1630
1635
Modeled clearsky GHI
1631
1636
1637
+ .. versionchanged:: 0.11.2
1638
+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
1639
+
1632
1640
max_clearsky_index : numeric, default 2.0
1633
1641
Maximum value of the clearsky index. The default, 2.0, allows
1634
1642
for over-irradiance events typically seen in sub-hourly data.
@@ -1638,12 +1646,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1638
1646
clearsky_index : numeric
1639
1647
Clearsky index
1640
1648
"""
1641
- clearsky_index = ghi / clearsky_ghi
1649
+ clearsky_index = ghi / ghi_clear
1642
1650
# set +inf, -inf, and nans to zero
1643
1651
clearsky_index = np .where (~ np .isfinite (clearsky_index ), 0 ,
1644
1652
clearsky_index )
1645
1653
# but preserve nans in the input arrays
1646
- input_is_nan = ~ np .isfinite (ghi ) | ~ np .isfinite (clearsky_ghi )
1654
+ input_is_nan = ~ np .isfinite (ghi ) | ~ np .isfinite (ghi_clear )
1647
1655
clearsky_index = np .where (input_is_nan , np .nan , clearsky_index )
1648
1656
1649
1657
clearsky_index = np .maximum (clearsky_index , 0 )
@@ -2151,20 +2159,25 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
2151
2159
return kt_prime_bin , zenith_bin , w_bin , delta_kt_prime_bin
2152
2160
2153
2161
2162
+ @renamed_kwarg_warning (
2163
+ since = '0.11.2' ,
2164
+ old_param_name = 'ghi_clearsky' ,
2165
+ new_param_name = 'ghi_clear' ,
2166
+ removal = "0.13.0" )
2154
2167
@renamed_kwarg_warning (
2155
2168
since = '0.11.2' ,
2156
2169
old_param_name = 'dni_clearsky' ,
2157
2170
new_param_name = 'dni_clear' ,
2158
2171
removal = "0.13.0" )
2159
- def dirindex (ghi , ghi_clearsky , dni_clear , zenith , times , pressure = 101325. ,
2172
+ def dirindex (ghi , ghi_clear , dni_clear , zenith , times , pressure = 101325. ,
2160
2173
use_delta_kt_prime = True , temp_dew = None , min_cos_zenith = 0.065 ,
2161
2174
max_zenith = 87 ):
2162
2175
"""
2163
2176
Determine DNI from GHI using the DIRINDEX model.
2164
2177
2165
2178
The DIRINDEX model [1]_ modifies the DIRINT model implemented in
2166
2179
:py:func:`pvlib.irradiance.dirint` by taking into account information
2167
- from a clear sky model. It is recommended that ``ghi_clearsky `` be
2180
+ from a clear sky model. It is recommended that ``ghi_clear `` be
2168
2181
calculated using the Ineichen clear sky model
2169
2182
:py:func:`pvlib.clearsky.ineichen` with ``perez_enhancement=True``.
2170
2183
@@ -2175,9 +2188,12 @@ def dirindex(ghi, ghi_clearsky, dni_clear, zenith, times, pressure=101325.,
2175
2188
ghi : array-like
2176
2189
Global horizontal irradiance. [Wm⁻²]
2177
2190
2178
- ghi_clearsky : array-like
2191
+ ghi_clear : array-like
2179
2192
Global horizontal irradiance from clear sky model. [Wm⁻²]
2180
2193
2194
+ .. versionchanged:: 0.11.2
2195
+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
2196
+
2181
2197
dni_clear : array-like
2182
2198
Direct normal irradiance from clear sky model. [Wm⁻²]
2183
2199
@@ -2240,7 +2256,7 @@ def dirindex(ghi, ghi_clearsky, dni_clear, zenith, times, pressure=101325.,
2240
2256
temp_dew = temp_dew , min_cos_zenith = min_cos_zenith ,
2241
2257
max_zenith = max_zenith )
2242
2258
2243
- dni_dirint_clearsky = dirint (ghi_clearsky , zenith , times ,
2259
+ dni_dirint_clearsky = dirint (ghi_clear , zenith , times ,
2244
2260
pressure = pressure ,
2245
2261
use_delta_kt_prime = use_delta_kt_prime ,
2246
2262
temp_dew = temp_dew ,
0 commit comments