@@ -1603,7 +1603,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1603
1603
return ghi
1604
1604
1605
1605
1606
- def clearsky_index (ghi , clearsky_ghi , max_clearsky_index = 2.0 ):
1606
+ def clearsky_index (ghi , ghi_clear , max_clearsky_index = 2.0 ):
1607
1607
"""
1608
1608
Calculate the clearsky index.
1609
1609
@@ -1615,8 +1615,8 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1615
1615
ghi : numeric
1616
1616
Global horizontal irradiance. [Wm⁻²]
1617
1617
1618
- clearsky_ghi : numeric
1619
- Modeled clearsky GHI
1618
+ ghi_clear : numeric
1619
+ Modeled clearsky GHI. [Wm⁻²]
1620
1620
1621
1621
max_clearsky_index : numeric, default 2.0
1622
1622
Maximum value of the clearsky index. The default, 2.0, allows
@@ -1627,12 +1627,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1627
1627
clearsky_index : numeric
1628
1628
Clearsky index
1629
1629
"""
1630
- clearsky_index = ghi / clearsky_ghi
1630
+ clearsky_index = ghi / ghi_clear
1631
1631
# set +inf, -inf, and nans to zero
1632
1632
clearsky_index = np .where (~ np .isfinite (clearsky_index ), 0 ,
1633
1633
clearsky_index )
1634
1634
# but preserve nans in the input arrays
1635
- input_is_nan = ~ np .isfinite (ghi ) | ~ np .isfinite (clearsky_ghi )
1635
+ input_is_nan = ~ np .isfinite (ghi ) | ~ np .isfinite (ghi_clear )
1636
1636
clearsky_index = np .where (input_is_nan , np .nan , clearsky_index )
1637
1637
1638
1638
clearsky_index = np .maximum (clearsky_index , 0 )
0 commit comments