8000 Issue #2245 Infinite sheds beam fraction on ground zenith guardrail syntax bug by jason-rpkt · Pull Request #2359 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Issue #2245 Infinite sheds beam fraction on ground zenith guardrail syntax bug #2359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
series input for ghi in test_infinite_sheds.py
  • Loading branch information
jason-rpkt committed Feb 4, 2025
commit dbb8afcb3be6c816ce23b08abacc40f6eb942e31
3 changes: 2 additions & 1 deletion docs/sphinx/source/whatsnew/v0.11.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Deprecations

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

Documentation
~~~~~~~~~~~~~
Expand Down
5 changes: 2 additions & 3 deletions pvlib/bifacial/infinite_sheds.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
Returns
-------
output : dict or DataFrame
Output is a "pandas.DataFrame" when "ghi" is a Series.
Otherwise it is a dict of "numpy.ndarray"
See Issue #2245
Output is a ``pandas.DataFrame`` when ``ghi`` is a Series.
Otherwise it is a dict of ``numpy.ndarray``
See Notes for descriptions of content.

Notes
Expand Down
2 changes: 1 addition & 1 deletion pvlib/bifacial/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def _unshaded_ground_fraction(surface_tilt, surface_azimuth, solar_zenith,
surface_azimuth)
f_gnd_beam = 1.0 - np.minimum(
1.0, gcr * np.abs(cosd(surface_tilt) + sind(surface_tilt) * tan_phi))
f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
# [1], Eq. 4
f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
return f_gnd_beam # 1 - min(1, abs()) < 1 always


Expand Down
1 change: 1 addition & 0 deletions pvlib/tests/bifacial/test_infinite_sheds.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def test_get_irradiance_poa():
# series inputs
surface_tilt = pd.Series(surface_tilt)
surface_azimuth = pd.Series(data=surface_azimuth, index=surface_tilt.index)
ghi = pd.Series(data=ghi, index=surface_tilt.index)
solar_zenith = pd.Series(solar_zenith, index=surface_tilt.index)
solar_azimuth = pd.Series(data=solar_azimuth, index=surface_tilt.index)
expected_diffuse = pd.Series(
Expand Down
0