Skip to content

Commit 379d1f8

Browse files
committed
Remove empty horizon brightening component from haydavies
1 parent ba4c7c5 commit 379d1f8

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

pvlib/irradiance.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
797797
* poa_sky_diffuse: Total sky diffuse
798798
* poa_isotropic
799799
* poa_circumsolar
800-
* poa_horizon (always zero, not accounted for by the
801-
Hay-Davies model)
800+
The model does not support a horizon brightening component.
802801
803802
Notes
804803
------
@@ -862,8 +861,6 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
862861
# Calculate the individual components
863862
diffuse_components['poa_isotropic'] = poa_isotropic
864863
diffuse_components['poa_circumsolar'] = poa_circumsolar
865-
diffuse_components['poa_horizon'] = np.where(
866-
np.isnan(diffuse_components['poa_isotropic']), np.nan, 0.)
867864

868865
if isinstance(sky_diffuse, pd.Series):
869866
diffuse_components = pd.DataFrame(diffuse_components)

tests/test_irradiance.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,11 @@ def test_haydavies(irrad_data, ephem_data, dni_et):
209209

210210

211211
def test_haydavies_components(irrad_data, ephem_data, dni_et):
212-
keys = ['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar',
213-
'poa_horizon']
212+
keys = ['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar']
214213
expected = pd.DataFrame(np.array(
215214
[[0, 27.1775, 102.9949, 33.1909],
216215
[0, 27.1775, 30.1818, 27.9837],
217-
[0, 0, 72.8130, 5.2071],
218-
[0, 0, 0, 0]]).T,
216+
[0, 0, 72.8130, 5.2071]]).T,
219217
columns=keys,
220218
index=irrad_data.index
221219
)

0 commit comments

Comments
 (0)