Skip to content

Commit f3db9b2

Browse files
authored
Merge branch 'main' into gti_dirint
2 parents 93781e2 + 6caa903 commit f3db9b2

File tree

7 files changed

+27
-8
lines changed

7 files changed

+27
-8
lines changed

ci/requirements-py3.12.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ dependencies:
2525
- statsmodels
2626
- pip:
2727
- nrel-pysam>=2.0
28-
# - solarfactors # required shapely<2 isn't available for 3.12
28+
- solarfactors

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ Enhancements
1212
~~~~~~~~~~~~
1313
* :py:func:`~pvlib.irradiance.gti_dirint` now raises an informative message
1414
when input data don't include values with AOI<90 (:issue:`1342`, :pull:`2347`)
15+
* Fix a bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may have yielded non-zero
16+
ground irradiance when the sun was below the horizon. (:issue:`2245`, :pull:`2359`)
17+
* Fix a bug where :py:func:`pvlib.transformer.simple_efficiency` could only be imported
18+
using the `from pvlib.transformer` syntax (:pull:`2388`)
1519

1620
Documentation
1721
~~~~~~~~~~~~~
1822
* Fix Procedural and Object Oriented simulation examples having slightly different results, in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`)
1923
* Restructure the user guide with subsections (:issue:`2302`, :pull:`2310`)
24+
* Add references for :py:func:`pvlib.snow.loss_townsend`. (:issue:`2383`, :pull:`2384`)
2025

2126
Testing
2227
~~~~~~~
@@ -39,4 +44,7 @@ Contributors
3944
* Rajiv Daxini (:ghuser:`RDaxini`)
4045
* Mark Campanelli (:ghuser:`markcampanelli`)
4146
* Cliff Hansen (:ghuser:`cwhanse`)
47+
* Jason Lun Leung (:ghuser:`jason-rpkt`)
4248
* Manoj K S (:ghuser:`manojks1999`)
49+
* Kurt Rhee (:ghuser:`kurt-rhee`)
50+
* Ayush jariyal (:ghuser:`ayushjariyal`)

pvlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
temperature,
2828
tools,
2929
tracking,
30+
transformer,
3031
)

pvlib/bifacial/infinite_sheds.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,9 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
260260
Returns
261261
-------
262262
output : dict or DataFrame
263-
Output is a DataFrame when input ghi is a Series. See Notes for
264-
descriptions of content.
263+
Output is a ``pandas.DataFrame`` when ``ghi`` is a Series.
264+
Otherwise it is a dict of ``numpy.ndarray``
265+
See Notes for descriptions of content.
265266
266267
Notes
267268
-----
@@ -372,7 +373,7 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
372373
'poa_global': poa_global, 'poa_direct': poa_direct,
373374
'poa_diffuse': poa_diffuse, 'poa_ground_diffuse': poa_gnd_pv,
374375
'poa_sky_diffuse': poa_sky_pv, 'shaded_fraction': f_x}
375-
if isinstance(poa_global, pd.Series):
376+
if isinstance(ghi, pd.Series):
376377
output = pd.DataFrame(output)
377378
return output
378379

pvlib/bifacial/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +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-
np.where(solar_zenith > max_zenith, 0., f_gnd_beam) # [1], Eq. 4
90+
# [1], Eq. 4
91+
f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
9192
return f_gnd_beam # 1 - min(1, abs()) < 1 always
9293

9394

pvlib/snow.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,23 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity,
278278
axis to the module edge.
279279
280280
The parameter `string_factor` is an enhancement added to the model after
281-
publication of [1]_ per private communication with the model's author. The
282-
definition for snow events documented above is also based on private
283-
communication with the model's author.
281+
publication of [1]_, as described in [2]_.
282+
The definition for snow events documented above is based on [3]_.
284283
285284
References
286285
----------
287286
.. [1] Townsend, Tim & Powers, Loren. (2011). Photovoltaics and snow: An
288287
update from two winters of measurements in the SIERRA. 37th IEEE
289288
Photovoltaic Specialists Conference, Seattle, WA, USA.
290289
:doi:`10.1109/PVSC.2011.6186627`
290+
.. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current
291+
Uses of the Townsend Snow Model. In "Photovoltaic Reliability
292+
Workshop (PVRW) 2023 Proceedings: Posters.", ed. Silverman,
293+
T. J. Dec. 2023. NREL/CP-5900-87918.
294+
Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf
295+
.. [3] Townsend, T. (2013). Predicting PV Energy Loss Caused by Snow.
296+
Solar Power International, Chicago IL.
297+
:doi:`10.13140/RG.2.2.14299.68647`
291298
'''
292299

293300
# unit conversions from cm and m to in, from C to K, and from % to fraction

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)