@@ -1614,7 +1614,12 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
16141614 return ghi
16151615
16161616
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 ):
16181623 """
16191624 Calculate the clearsky index.
16201625
@@ -1626,9 +1631,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
16261631 ghi : numeric
16271632 Global horizontal irradiance. [Wm⁻²]
16281633
1629- clearsky_ghi : numeric
1634+ ghi_clear : numeric
16301635 Modeled clearsky GHI
16311636
1637+ .. versionchanged:: 0.11.2
1638+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
1639+
16321640 max_clearsky_index : numeric, default 2.0
16331641 Maximum value of the clearsky index. The default, 2.0, allows
16341642 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):
16381646 clearsky_index : numeric
16391647 Clearsky index
16401648 """
1641- clearsky_index = ghi / clearsky_ghi
1649+ clearsky_index = ghi / ghi_clear
16421650 # set +inf, -inf, and nans to zero
16431651 clearsky_index = np .where (~ np .isfinite (clearsky_index ), 0 ,
16441652 clearsky_index )
16451653 # 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 )
16471655 clearsky_index = np .where (input_is_nan , np .nan , clearsky_index )
16481656
16491657 clearsky_index = np .maximum (clearsky_index , 0 )
@@ -2151,20 +2159,25 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
21512159 return kt_prime_bin , zenith_bin , w_bin , delta_kt_prime_bin
21522160
21532161
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" )
21542167@renamed_kwarg_warning (
21552168 since = '0.11.2' ,
21562169 old_param_name = 'dni_clearsky' ,
21572170 new_param_name = 'dni_clear' ,
21582171 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. ,
21602173 use_delta_kt_prime = True , temp_dew = None , min_cos_zenith = 0.065 ,
21612174 max_zenith = 87 ):
21622175 """
21632176 Determine DNI from GHI using the DIRINDEX model.
21642177
21652178 The DIRINDEX model [1]_ modifies the DIRINT model implemented in
21662179 :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
21682181 calculated using the Ineichen clear sky model
21692182 :py:func:`pvlib.clearsky.ineichen` with ``perez_enhancement=True``.
21702183
@@ -2175,9 +2188,12 @@ def dirindex(ghi, ghi_clearsky, dni_clear, zenith, times, pressure=101325.,
21752188 ghi : array-like
21762189 Global horizontal irradiance. [Wm⁻²]
21772190
2178- ghi_clearsky : array-like
2191+ ghi_clear : array-like
21792192 Global horizontal irradiance from clear sky model. [Wm⁻²]
21802193
2194+ .. versionchanged:: 0.11.2
2195+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
2196+
21812197 dni_clear : array-like
21822198 Direct normal irradiance from clear sky model. [Wm⁻²]
21832199
@@ -2240,7 +2256,7 @@ def dirindex(ghi, ghi_clearsky, dni_clear, zenith, times, pressure=101325.,
22402256 temp_dew = temp_dew , min_cos_zenith = min_cos_zenith ,
22412257 max_zenith = max_zenith )
22422258
2243- dni_dirint_clearsky = dirint (ghi_clearsky , zenith , times ,
2259+ dni_dirint_clearsky = dirint (ghi_clear , zenith , times ,
22442260 pressure = pressure ,
22452261 use_delta_kt_prime = use_delta_kt_prime ,
22462262 temp_dew = temp_dew ,
0 commit comments