Skip to content

Commit dbb8afc

Browse files
committed
series input for ghi in test_infinite_sheds.py
1 parent dae7326 commit dbb8afc

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

docs/sphinx/source/whatsnew/v0.11.3.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Deprecations
1010

1111
Enhancements
1212
~~~~~~~~~~~~
13-
Fix syntax for unshaded ground fraction (:issue:`2245`, :pull:`2359`)
13+
Fix bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may had yielded non-zero ground
14+
irradiance with sun below horizon (:issue:`2245`, :pull:`2359`)
1415

1516
Documentation
1617
~~~~~~~~~~~~~

pvlib/bifacial/infinite_sheds.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,8 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
260260
Returns
261261
-------
262262
output : dict or DataFrame
263-
Output is a "pandas.DataFrame" when "ghi" is a Series.
264-
Otherwise it is a dict of "numpy.ndarray"
265-
See Issue #2245
263+
Output is a ``pandas.DataFrame`` when ``ghi`` is a Series.
264+
Otherwise it is a dict of ``numpy.ndarray``
266265
See Notes for descriptions of content.
267266
268267
Notes

pvlib/bifacial/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def _unshaded_ground_fraction(surface_tilt, surface_azimuth, solar_zenith,
8787
surface_azimuth)
8888
f_gnd_beam = 1.0 - np.minimum(
8989
1.0, gcr * np.abs(cosd(surface_tilt) + sind(surface_tilt) * tan_phi))
90-
f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
9190
# [1], Eq. 4
91+
f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
9292
return f_gnd_beam # 1 - min(1, abs()) < 1 always
9393

9494

pvlib/tests/bifacial/test_infinite_sheds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def test_get_irradiance_poa():
130130
# series inputs
131131
surface_tilt = pd.Series(surface_tilt)
132132
surface_azimuth = pd.Series(data=surface_azimuth, index=surface_tilt.index)
133+
ghi = pd.Series(data=ghi, index=surface_tilt.index)
133134
solar_zenith = pd.Series(solar_zenith, index=surface_tilt.index)
134135
solar_azimuth = pd.Series(data=solar_azimuth, index=surface_tilt.index)
135136
expected_diffuse = pd.Series(

0 commit comments

Comments
 (0)