Skip to content

Commit 2eaff7e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into rename-solar-position-tracking.singlaxis
2 parents 0baa049 + a27c686 commit 2eaff7e

File tree

13 files changed

+107
-58
lines changed

13 files changed

+107
-58
lines changed

docs/sphinx/source/whatsnew.rst

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

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

9-
.. include:: whatsnew/v0.12.1.rst
9+
.. include:: whatsnew/v0.13.1.rst
10+
.. include:: whatsnew/v0.13.0.rst
1011
.. include:: whatsnew/v0.12.0.rst
1112
.. include:: whatsnew/v0.11.2.rst
1213
.. include:: whatsnew/v0.11.1.rst

docs/sphinx/source/whatsnew/v0.12.1.rst renamed to docs/sphinx/source/whatsnew/v0.13.0.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.. _whatsnew_01201:
1+
.. _whatsnew_01300:
22

33

4-
v0.12.1 (XXXX, 2025)
5-
------------------------
4+
v0.13.0 (June 7, 2025)
5+
----------------------
66

77
Breaking Changes
88
~~~~~~~~~~~~~~~~
@@ -15,6 +15,9 @@ Breaking Changes
1515
:py:func:`~pvlib.iotools.get_pvgis_tmy` now return ``(data,meta)``
1616
following the iotools convention instead of ``(data,months_selected,inputs,meta)``.
1717
(:pull:`2470`)
18+
* :py:func:`~pvlib.iotools.get_pvgis_tmy` now defaults to ``coerce_year=1990``,
19+
whereas the default behavior previously was to use the years of the selected
20+
months for the TMY index. (:pull:`2474`)
1821
* Remove ``outputformat='basic'`` option in :py:func:`~pvlib.iotools.get_pvgis_tmy`.
1922
(:pull:`2416`)
2023

@@ -51,7 +54,7 @@ Enhancements
5154
:py:class:`~pvlib.pvsystem.PVSystem` and :py:class:`~pvlib.modelchain.ModelChain`.
5255
(:issue:`2402`, :pull:`2433`)
5356
* Add optional arguments ``temperature_ref`` and ``irradiance_ref`` to
54-
:py:func:`~pvlib.pvsystem.sapm`(:issue:`2432`, :pull:`2434`)
57+
:py:func:`~pvlib.pvsystem.sapm` (:issue:`2432`, :pull:`2434`)
5558
* Add NREL NSRDB PSM v4 API client to :py:mod:`pvlib.iotools`. See
5659
:py:func:`~pvlib.iotools.get_nsrdb_psm4_aggregated`,
5760
:py:func:`~pvlib.iotools.get_nsrdb_psm4_tmy`,
@@ -72,7 +75,7 @@ Documentation
7275
:py:func:`~pvlib.pvsystem.sapm` (:issue:`2392`, :pull:`2435`)
7376
* Add gallery example on calculating irradiance at crop level for agriPV systems.
7477
(:pull:`2459`)
75-
* Update references in :py:func`~pvlib.irradiance.get_extra_radiation`
78+
* Update references in :py:func:`~pvlib.irradiance.get_extra_radiation`
7679
(:issue:`2333`, :pull:`2347`)
7780
* Update references in :py:func:`~pvlib.iotools.get_cams` and :py:func:`~pvlib.iotools.read_cams`
7881
(:issue:`2427`, :pull:`2457`)
@@ -83,16 +86,11 @@ Requirements
8386
~~~~~~~~~~~~
8487
* ``wheel`` is no longer a build dependency. (:pull:`2439`)
8588

86-
Testing
87-
~~~~~~~
88-
89-
9089
Maintenance
9190
~~~~~~~~~~~
9291
* Update ``pyproject.toml`` to replace deprecated license table and
9392
classifiers. (:issue:`2440`, :pull:`2441`)
9493

95-
9694
Contributors
9795
~~~~~~~~~~~~
9896
* Cliff Hansen (:ghuser:`cwhanse`)
@@ -105,3 +103,10 @@ Contributors
105103
* omahs (:ghuser:`omahs`)
106104
* Adam R. Jensen (:ghuser:`AdamRJensen`)
107105
* Marion Schroedter-Homscheidt (:ghuser:`mschroedter`)
106+
* Anton Driesse (:ghuser:`adriesse`)
107+
* Mark Mikofski (:ghuser:`mikofski`)
108+
* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`)
109+
* Mark Campanelli (:ghuser:`markcampanelli`)
110+
* Paul Gilman (:ghuser:`cpaulgilman`)
111+
* Yu Xie (:ghuser:`xieyupku`)
112+
* Grant Buster (:ghuser:`grantbuster`)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _whatsnew_0_13_1:
2+
3+
4+
v0.13.1 (Anticipated September, 2025)
5+
-------------------------------------
6+
7+
Breaking Changes
8+
~~~~~~~~~~~~~~~~
9+
10+
11+
Deprecations
12+
~~~~~~~~~~~~
13+
14+
15+
Bug fixes
16+
~~~~~~~~~
17+
18+
19+
Enhancements
20+
~~~~~~~~~~~~
21+
22+
23+
Documentation
24+
~~~~~~~~~~~~~
25+
26+
27+
Testing
28+
~~~~~~~
29+
30+
31+
Benchmarking
32+
~~~~~~~~~~~~
33+
34+
35+
Requirements
36+
~~~~~~~~~~~~
37+
38+
39+
Maintenance
40+
~~~~~~~~~~~
41+
42+
43+
Contributors
44+
~~~~~~~~~~~~
45+

pvlib/iotools/bsrn.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ def get_bsrn(station, start, end, username, password,
162162
end = pd.to_datetime(end)
163163

164164
# Generate list files to download based on start/end (SSSMMYY.dat.gz)
165-
filenames = pd.date_range(
166-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1M')\
165+
filenames = pd.date_range(start.date().replace(day=1), end, freq='1MS')\
167166
.strftime(f"{station}%m%y.dat.gz").tolist()
168167

169168
# Create FTP connection

pvlib/iotools/psm3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,5 @@ def read_psm3(filename, map_variables=True):
361361
return data, metadata
362362

363363

364-
parse_psm3 = deprecated(since="0.12.1", name="parse_psm3",
364+
parse_psm3 = deprecated(since="0.13.0", name="parse_psm3",
365365
alternative="read_psm3")(read_psm3)

pvlib/iotools/psm4.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373

7474
def get_nsrdb_psm4_aggregated(latitude, longitude, api_key, email,
75-
year='2023', time_step=60,
75+
year, time_step=60,
7676
parameters=PARAMETERS, leap_day=True,
7777
full_name=PVLIB_PYTHON,
7878
affiliation=PVLIB_PYTHON,
@@ -96,7 +96,7 @@ def get_nsrdb_psm4_aggregated(latitude, longitude, api_key, email,
9696
email : str
9797
NREL API uses this to automatically communicate messages back
9898
to the user only if necessary
99-
year : str, default '2023'
99+
year : int or str
100100
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
101101
allowed values update periodically, so consult the NSRDB reference
102102
below for the current set of options. Called ``names`` in NSRDB API.
@@ -173,9 +173,6 @@ def get_nsrdb_psm4_aggregated(latitude, longitude, api_key, email,
173173
latitude = ('%8.4f' % latitude).strip()
174174
# TODO: make format_WKT(object_type, *args) in tools.py
175175

176-
# convert to string to accomodate integer years being passed in
177-
year = str(year)
178-
179176
# convert pvlib names in parameters to PSM4 convention
180177
parameters = [REQUEST_VARIABLE_MAP.get(a, a) for a in parameters]
181178

@@ -314,9 +311,6 @@ def get_nsrdb_psm4_tmy(latitude, longitude, api_key, email, year='tmy',
314311
latitude = ('%8.4f' % latitude).strip()
315312
# TODO: make format_WKT(object_type, *args) in tools.py
316313

317-
# convert to string to accomodate integer years being passed in
318-
year = str(year)
319-
320314
# convert pvlib names in parameters to PSM4 convention
321315
parameters = [REQUEST_VARIABLE_MAP.get(a, a) for a in parameters]
322316

@@ -354,7 +348,7 @@ def get_nsrdb_psm4_tmy(latitude, longitude, api_key, email, year='tmy',
354348
return read_nsrdb_psm4(fbuf, map_variables)
355349

356350

357-
def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
351+
def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year,
358352
time_step=60, parameters=PARAMETERS, leap_day=True,
359353
full_name=PVLIB_PYTHON, affiliation=PVLIB_PYTHON,
360354
utc=False, map_variables=True, url=None, timeout=30):
@@ -376,7 +370,7 @@ def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
376370
email : str
377371
NREL API uses this to automatically communicate messages back
378372
to the user only if necessary
379-
year : str, default '2023'
373+
year : int or str
380374
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
381375
allowed values update periodically, so consult the NSRDB reference
382376
below for the current set of options. Called ``names`` in NSRDB API.
@@ -453,9 +447,6 @@ def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
453447
latitude = ('%8.4f' % latitude).strip()
454448
# TODO: make format_WKT(object_type, *args) in tools.py
455449

456-
# convert to string to accomodate integer years being passed in
457-
year = str(year)
458-
459450
# convert pvlib names in parameters to PSM4 convention
460451
parameters = [REQUEST_VARIABLE_MAP.get(a, a) for a in parameters]
461452

@@ -494,7 +485,7 @@ def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
494485

495486

496487
def get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email,
497-
year='2023', time_step=60,
488+
year, time_step=60,
498489
parameters=PARAMETERS, leap_day=True,
499490
full_name=PVLIB_PYTHON,
500491
affiliation=PVLIB_PYTHON, utc=False,
@@ -517,7 +508,7 @@ def get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email,
517508
email : str
518509
NREL API uses this to automatically communicate messages back
519510
to the user only if necessary
520-
year : str, default '2023'
511+
year : int or str
521512
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
522513
allowed values update periodically, so consult the NSRDB reference
523514
below for the current set of options. Called ``names`` in NSRDB API.
@@ -595,9 +586,6 @@ def get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email,
595586
latitude = ('%8.4f' % latitude).strip()
596587
# TODO: make format_WKT(object_type, *args) in tools.py
597588

598-
# convert to string to accomodate integer years being passed in
599-
year = str(year)
600-
601589
# convert pvlib names in parameters to PSM4 convention
602590
parameters = [REQUEST_VARIABLE_MAP.get(a, a) for a in parameters]
603591

pvlib/iotools/pvgis.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def _coerce_and_roll_tmy(tmy_data, tz, year):
434434
def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
435435
userhorizon=None, startyear=None, endyear=None,
436436
map_variables=True, url=URL, timeout=30,
437-
roll_utc_offset=None, coerce_year=None):
437+
roll_utc_offset=None, coerce_year=1990):
438438
"""
439439
Get TMY data from PVGIS.
440440
@@ -477,9 +477,11 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
477477
Use to specify a time zone other than the default UTC zero and roll
478478
dataframe by ``roll_utc_offset`` so it starts at midnight on January
479479
1st. Ignored if ``None``, otherwise will force year to ``coerce_year``.
480-
coerce_year: int, optional
481-
Use to force indices to desired year. Will default to 1990 if
482-
``coerce_year`` is not specified, but ``roll_utc_offset`` is specified.
480+
coerce_year: int, default 1990
481+
Use to force indices to desired year. Defaults to 1990. Specify
482+
``None`` to return the actual indices used for the TMY. If
483+
``coerce_year`` is ``None``, but ``roll_utc_offset`` is specified,
484+
then ``coerce_year`` will be set to the default.
483485
484486
Returns
485487
-------

pvlib/iotools/sodapro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,5 +359,5 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):
359359
return data, metadata
360360

361361

362-
parse_cams = deprecated(since="0.12.1", name="parse_cams",
362+
parse_cams = deprecated(since="0.13.0", name="parse_cams",
363363
alternative="read_cams")(read_cams)

pvlib/iotools/srml.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
236236
end = pd.to_datetime(end)
237237

238238
# Generate list of months
239-
months = pd.date_range(
240-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1M')
239+
months = pd.date_range(start.date().replace(day=1), end, freq='1MS')
241240
months_str = months.strftime('%y%m')
242241

243242
# Generate list of filenames

pvlib/irradiance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
16271627
since='0.11.2',
16281628
old_param_name='clearsky_ghi',
16291629
new_param_name='ghi_clear',
1630-
removal="0.13.0")
1630+
removal="0.14.0")
16311631
def clearsky_index(ghi, ghi_clear, max_clearsky_index=2.0):
16321632
"""
16331633
Calculate the clearsky index.
@@ -2172,12 +2172,12 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
21722172
since='0.11.2',
21732173
old_param_name='ghi_clearsky',
21742174
new_param_name='ghi_clear',
2175-
removal="0.13.0")
2175+
removal="0.14.0")
21762176
@renamed_kwarg_warning(
21772177
since='0.11.2',
21782178
old_param_name='dni_clearsky',
21792179
new_param_name='dni_clear',
2180-
removal="0.13.0")
2180+
removal="0.14.0")
21812181
def dirindex(ghi, ghi_clear, dni_clear, zenith, times, pressure=101325.,
21822182
use_delta_kt_prime=True, temp_dew=None, min_cos_zenith=0.065,
21832183
max_zenith=87):
@@ -3662,7 +3662,7 @@ def _get_dirint_coeffs():
36623662
since='0.11.2',
36633663
old_param_name='clearsky_dni',
36643664
new_param_name='dni_clear',
3665-
removal="0.13.0")
3665+
removal="0.14.0")
36663666
def dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1,
36673667
zenith_threshold_for_zero_dni=88.0,
36683668
zenith_threshold_for_clearsky_limit=80.0):

0 commit comments

Comments
 (0)