Skip to content

Commit ae12b8a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into prtemplate
2 parents cbeb170 + b3a3782 commit ae12b8a

8 files changed

Lines changed: 67 additions & 75 deletions

File tree

docs/sphinx/source/reference/location.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Classes
1616
:toctree: generated/
1717

1818
location.Location
19+
1920
A :py:class:`~pvlib.location.Location` object may be created from the
2021
metadata returned by these file types:
2122

docs/sphinx/source/whatsnew.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ What's New
66

77
These are new features and improvements of note in each release.
88

9-
.. include:: whatsnew/v0.13.2.rst
9+
.. include:: whatsnew/v0.14.0.rst
1010
.. include:: whatsnew/v0.13.1.rst
1111
.. include:: whatsnew/v0.13.0.rst
1212
.. include:: whatsnew/v0.12.0.rst
Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
.. _whatsnew_0_13_2:
1+
.. _whatsnew_0_14_0:
22

33

4-
v0.13.2 (Anticipated December, 2025)
5-
------------------------------------
4+
v0.14.0 (January 16, 2026)
5+
--------------------------
66

77
Breaking Changes
88
~~~~~~~~~~~~~~~~
99
* Following the removal of the NSRDB PSM3 API, the :func:`!pvlib.iotools.get_psm3`,
1010
:func:`!pvlib.iotools.read_psm3`, and :func:`!pvlib.iotools.parse_psm3`
1111
functions are removed. (:issue:`2581`, :pull:`2582`)
12-
13-
14-
Deprecations
15-
~~~~~~~~~~~~
16-
17-
18-
Bug fixes
19-
~~~~~~~~~
12+
* Rename output column names to be prefixed with ``"poa_"`` when ``return_components=True``
13+
in :py:func:`~pvlib.irradiance.haydavies`, :py:func:`~pvlib.irradiance.perez`,
14+
and :py:func:`~pvlib.irradiance.perez_driesse`. (:issue:`2529`, :pull:`2627`)
2015

2116
Enhancements
2217
~~~~~~~~~~~~
@@ -54,7 +49,6 @@ Documentation
5449
* Fix typo in parameter name ``atmos_refract`` in :py:func:`pvlib.solarposition.spa_python`
5550
and :py:func:`pvlib.spa.solar_position`. (:issue:`2532`, :pull:`2592`)
5651

57-
5852
Testing
5953
~~~~~~~
6054
* Add Python 3.14 to test suite. (:pull:`2590`)
@@ -63,18 +57,9 @@ Testing
6357
* Correct argument and value order in :py:func:`~pvlib.tests.ivtools.test_sde`,
6458
in tests of :py:func:`~pvlib.ivtools.sde._fit_sandia_cocontent`. (:issue:`2613`, :pull:`2615`)
6559

66-
67-
Benchmarking
68-
~~~~~~~~~~~~
69-
70-
7160
Requirements
7261
~~~~~~~~~~~~
73-
74-
75-
Maintenance
76-
~~~~~~~~~~~
77-
62+
* Advance minimum solarfactors to v1.6.1. (:pull:`2656`)
7863

7964
Contributors
8065
~~~~~~~~~~~~
@@ -87,3 +72,9 @@ Contributors
8772
* Anton Driesse (:ghuser:`adriesse`)
8873
* Rajiv Daxini (:ghuser:`RDaxini`)
8974
* Kevin Anderson (:ghuser:`kandersolar`)
75+
* Mark Mikofski (:ghuser:`mikofski`)
76+
* Will Holmgren (:ghuser:`wholmgren`)
77+
* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`)
78+
* Mark Campanelli (:ghuser:`markcampanelli`)
79+
* Aman Srivastava (:ghuser:`aman-coder03`)
80+
* Vincent Filter (:ghuser:`vfilter`)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _whatsnew_0_13_3:
1+
.. _whatsnew_0_14_1:
22

33

4-
v0.13.3 (Month XX, 20YY)
4+
v0.14.1 (Month XX, 20YY)
55
-----------------------
66

77
Breaking Changes

pvlib/bifacial/infinite_sheds.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,16 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
301301
sky_diffuse_comps_horizontal = haydavies(0, 180, dhi, dni, dni_extra,
302302
solar_zenith, solar_azimuth,
303303
return_components=True)
304-
circumsolar_horizontal = sky_diffuse_comps_horizontal['circumsolar']
304+
circumsolar_horizontal = \
305+
sky_diffuse_comps_horizontal['poa_circumsolar']
305306

306307
# Call haydavies a second time where circumsolar_normal is facing
307308
# directly towards sun, and can be added to DNI
308309
sky_diffuse_comps_normal = haydavies(solar_zenith, solar_azimuth, dhi,
309310
dni, dni_extra, solar_zenith,
310311
solar_azimuth,
311312
return_components=True)
312-
circumsolar_normal = sky_diffuse_comps_normal['circumsolar']
313+
circumsolar_normal = sky_diffuse_comps_normal['poa_circumsolar']
313314

314315
dhi = dhi - circumsolar_horizontal
315316
dni = dni + circumsolar_normal

pvlib/irradiance.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
793793
794794
diffuse_components : OrderedDict (array input) or DataFrame (Series input)
795795
Keys/columns are:
796-
* sky_diffuse: Total sky diffuse
797-
* isotropic
798-
* circumsolar
799-
* horizon (always zero, not accounted for by the Hay-Davies model)
796+
* poa_sky_diffuse: Total sky diffuse
797+
* poa_isotropic
798+
* poa_circumsolar
799+
* poa_horizon (always zero, not accounted for by the
800+
Hay-Davies model)
800801
801802
Notes
802803
------
@@ -855,13 +856,13 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
855856

856857
if return_components:
857858
diffuse_components = OrderedDict()
858-
diffuse_components['sky_diffuse'] = sky_diffuse
859+
diffuse_components['poa_sky_diffuse'] = sky_diffuse
859860

860861
# Calculate the individual components
861-
diffuse_components['isotropic'] = poa_isotropic
862-
diffuse_components['circumsolar'] = poa_circumsolar
863-
diffuse_components['horizon'] = np.where(
864-
np.isnan(diffuse_components['isotropic']), np.nan, 0.)
862+
diffuse_components['poa_isotropic'] = poa_isotropic
863+
diffuse_components['poa_circumsolar'] = poa_circumsolar
864+
diffuse_components['poa_horizon'] = np.where(
865+
np.isnan(diffuse_components['poa_isotropic']), np.nan, 0.)
865866

866867
if isinstance(sky_diffuse, pd.Series):
867868
diffuse_components = pd.DataFrame(diffuse_components)
@@ -1111,10 +1112,10 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11111112
11121113
diffuse_components : OrderedDict (array input) or DataFrame (Series input)
11131114
Keys/columns are:
1114-
* sky_diffuse: Total sky diffuse
1115-
* isotropic
1116-
* circumsolar
1117-
* horizon
1115+
* poa_sky_diffuse: Total sky diffuse
1116+
* poa_isotropic
1117+
* poa_circumsolar
1118+
* poa_horizon
11181119
11191120
11201121
References
@@ -1197,12 +1198,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11971198

11981199
if return_components:
11991200
diffuse_components = OrderedDict()
1200-
diffuse_components['sky_diffuse'] = sky_diffuse
1201+
diffuse_components['poa_sky_diffuse'] = sky_diffuse
12011202

12021203
# Calculate the different components
1203-
diffuse_components['isotropic'] = dhi * term1
1204-
diffuse_components['circumsolar'] = dhi * term2
1205-
diffuse_components['horizon'] = dhi * term3
1204+
diffuse_components['poa_isotropic'] = dhi * term1
1205+
diffuse_components['poa_circumsolar'] = dhi * term2
1206+
diffuse_components['poa_horizon'] = dhi * term3
12061207

12071208
# Set values of components to 0 when sky_diffuse is 0
12081209
mask = sky_diffuse == 0
@@ -1353,10 +1354,10 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13531354
13541355
diffuse_components : OrderedDict (array input) or DataFrame (Series input)
13551356
Keys/columns are:
1356-
* sky_diffuse: Total sky diffuse
1357-
* isotropic
1358-
* circumsolar
1359-
* horizon
1357+
* poa_sky_diffuse: Total sky diffuse
1358+
* poa_isotropic
1359+
* poa_circumsolar
1360+
* poa_horizon
13601361
13611362
Notes
13621363
-----
@@ -1417,12 +1418,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14171418

14181419
if return_components:
14191420
diffuse_components = OrderedDict()
1420-
diffuse_components['sky_diffuse'] = sky_diffuse
1421+
diffuse_components['poa_sky_diffuse'] = sky_diffuse
14211422

14221423
# Calculate the different components
1423-
diffuse_components['isotropic'] = dhi * term1
1424-
diffuse_components['circumsolar'] = dhi * term2
1425-
diffuse_components['horizon'] = dhi * term3
1424+
diffuse_components['poa_isotropic'] = dhi * term1
1425+
diffuse_components['poa_circumsolar'] = dhi * term2
1426+
diffuse_components['poa_horizon'] = dhi * term3
14261427

14271428
if isinstance(sky_diffuse, pd.Series):
14281429
diffuse_components = pd.DataFrame(diffuse_components)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ optional = [
5050
'ephem',
5151
'nrel-pysam',
5252
'numba >= 0.17.0',
53-
'solarfactors',
53+
'solarfactors >= 1.6.1',
5454
'statsmodels',
5555
]
5656
doc = [
@@ -64,7 +64,7 @@ doc = [
6464
'pillow',
6565
'sphinx-toggleprompt == 0.5.2',
6666
'sphinx-favicon',
67-
'solarfactors',
67+
'solarfactors >= 1.6.1',
6868
'sphinx-hoverxref ~= 1.4.2', # when updating, check that _static/tooltipster_color_theming.css still works
6969
]
7070
test = [

tests/test_irradiance.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,14 @@ def test_haydavies(irrad_data, ephem_data, dni_et):
210210

211211

212212
def test_haydavies_components(irrad_data, ephem_data, dni_et):
213+
keys = ['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar',
214+
'poa_horizon']
213215
expected = pd.DataFrame(np.array(
214216
[[0, 27.1775, 102.9949, 33.1909],
215217
[0, 27.1775, 30.1818, 27.9837],
216218
[0, 0, 72.8130, 5.2071],
217219
[0, 0, 0, 0]]).T,
218-
columns=['sky_diffuse', 'isotropic', 'circumsolar', 'horizon'],
220+
columns=keys,
219221
index=irrad_data.index
220222
)
221223
# pandas
@@ -229,23 +231,16 @@ def test_haydavies_components(irrad_data, ephem_data, dni_et):
229231
40, 180, irrad_data['dhi'].values, irrad_data['dni'].values, dni_et,
230232
ephem_data['apparent_zenith'].values, ephem_data['azimuth'].values,
231233
return_components=True)
232-
assert_allclose(result['sky_diffuse'], expected['sky_diffuse'], atol=1e-4)
233-
assert_allclose(result['isotropic'], expected['isotropic'], atol=1e-4)
234-
assert_allclose(result['circumsolar'], expected['circumsolar'], atol=1e-4)
235-
assert_allclose(result['horizon'], expected['horizon'], atol=1e-4)
234+
for key in keys:
235+
assert_allclose(result[key], expected[key], atol=1e-4)
236236
assert isinstance(result, dict)
237237
# scalar
238238
result = irradiance.haydavies(
239239
40, 180, irrad_data['dhi'].values[-1], irrad_data['dni'].values[-1],
240240
dni_et[-1], ephem_data['apparent_zenith'].values[-1],
241241
ephem_data['azimuth'].values[-1], return_components=True)
242-
assert_allclose(result['sky_diffuse'], expected['sky_diffuse'].iloc[-1],
243-
atol=1e-4)
244-
assert_allclose(result['isotropic'], expected['isotropic'].iloc[-1],
245-
atol=1e-4)
246-
assert_allclose(result['circumsolar'], expected['circumsolar'].iloc[-1],
247-
atol=1e-4)
248-
assert_allclose(result['horizon'], expected['horizon'].iloc[-1], atol=1e-4)
242+
for key in keys:
243+
assert_allclose(result[key], expected[key].iloc[-1], atol=1e-4)
249244
assert isinstance(result, dict)
250245

251246

@@ -312,13 +307,14 @@ def test_perez_components(irrad_data, ephem_data, dni_et, relative_airmass):
312307
[0., 26.84138589, np.nan, 31.72696071],
313308
[0., 0., np.nan, 4.47966439],
314309
[0., 4.62212181, np.nan, 9.25316454]]).T,
315-
columns=['sky_diffuse', 'isotropic', 'circumsolar', 'horizon'],
310+
columns=['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar',
311+
'poa_horizon'],
316312
index=irrad_data.index
317313
)
318-
expected_for_sum = expected['sky_diffuse'].copy()
314+
expected_for_sum = expected['poa_sky_diffuse'].copy()
319315
expected_for_sum.iloc[2] = 0
320316
sum_components = out.iloc[:, 1:].sum(axis=1)
321-
sum_components.name = 'sky_diffuse'
317+
sum_components.name = 'poa_sky_diffuse'
322318

323319
assert_frame_equal(out, expected, check_less_precise=2)
324320
assert_series_equal(sum_components, expected_for_sum, check_less_precise=2)
@@ -338,13 +334,14 @@ def test_perez_driesse_components(irrad_data, ephem_data, dni_et,
338334
[0., 25.806, np.nan, 33.181],
339335
[0., 0.000, np.nan, 4.197],
340336
[0., 4.184, np.nan, 10.018]]).T,
341-
columns=['sky_diffuse', 'isotropic', 'circumsolar', 'horizon'],
337+
columns=['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar',
338+
'poa_horizon'],
342339
index=irrad_data.index
343340
)
344-
expected_for_sum = expected['sky_diffuse'].copy()
341+
expected_for_sum = expected['poa_sky_diffuse'].copy()
345342
expected_for_sum.iloc[2] = 0
346343
sum_components = out.iloc[:, 1:].sum(axis=1)
347-
sum_components.name = 'sky_diffuse'
344+
sum_components.name = 'poa_sky_diffuse'
348345

349346
assert_frame_equal(out, expected, check_less_precise=2)
350347
assert_series_equal(sum_components, expected_for_sum, check_less_precise=2)
@@ -384,13 +381,14 @@ def test_perez_negative_horizon():
384381
[166.785419, 142.24475, 119.173875, 83.525150, 45.725931],
385382
[113.548755, 16.09757, 9.956174, 3.142467, 0],
386383
[1.076010, -6.13353, -5.262151, -3.831230, -2.208923]]).T,
387-
columns=['sky_diffuse', 'isotropic', 'circumsolar', 'horizon'],
384+
columns=['poa_sky_diffuse', 'poa_isotropic', 'poa_circumsolar',
385+
'poa_horizon'],
388386
index=times
389387
)
390388

391-
expected_for_sum = expected['sky_diffuse'].copy()
389+
expected_for_sum = expected['poa_sky_diffuse'].copy()
392390
sum_components = out.iloc[:, 1:].sum(axis=1)
393-
sum_components.name = 'sky_diffuse'
391+
sum_components.name = 'poa_sky_diffuse'
394392

395393
assert_frame_equal(out, expected, check_less_precise=2)
396394
assert_series_equal(sum_components, expected_for_sum, check_less_precise=2)

0 commit comments

Comments
 (0)