Skip to content

Commit

Permalink
clearsky.py: haurwitz(), detect_clearsky
Browse files Browse the repository at this point in the history
  • Loading branch information
RDaxini committed Oct 21, 2024
1 parent bf1c0d8 commit 37d17b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pvlib/clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ def haurwitz(apparent_zenith):
'''

cos_zenith = tools.cosd(apparent_zenith.values)
clearsky_ghi = np.zeros_like(apparent_zenith.values)
ghi_clear = np.zeros_like(apparent_zenith.values)
cos_zen_gte_0 = cos_zenith > 0
clearsky_ghi[cos_zen_gte_0] = (1098.0 * cos_zenith[cos_zen_gte_0] *
np.exp(-0.059/cos_zenith[cos_zen_gte_0]))
ghi_clear[cos_zen_gte_0] = (1098.0 * cos_zenith[cos_zen_gte_0] *
np.exp(-0.059/cos_zenith[cos_zen_gte_0]))

df_out = pd.DataFrame(index=apparent_zenith.index,
data=clearsky_ghi,
data=ghi_clear,
columns=['ghi'])

return df_out
Expand Down Expand Up @@ -751,7 +751,7 @@ def detect_clearsky(measured, clearsky, times=None, infer_limits=False,
for each condition. Only provided if return_components is True.
alpha : scalar, optional
Scaling factor applied to the clearsky_ghi to obtain the
Scaling factor applied to the ghi_clear to obtain the
detected clear_samples. Only provided if return_components is
True.
Expand Down

0 comments on commit 37d17b8

Please # to comment.