Skip to content

Commit 50b1740

Browse files
committed
Merge branch 'main' into cross-axis-whatever-name-consistent-name
2 parents d8467bc + 03fb340 commit 50b1740

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1465
-827
lines changed

.github/workflows/pytest-remote-data.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
strategy:
5757
fail-fast: false # don't cancel other matrix jobs when one fails
5858
matrix:
59-
python-version: ["3.10", "3.11", "3.12", "3.13"]
59+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
6060
suffix: [''] # the alternative to "-min"
6161
include:
6262
- python-version: "3.10"
@@ -100,6 +100,9 @@ jobs:
100100
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
101101
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
102102
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}
103+
ECMWF_API_KEY: ${{ secrets.ECMWF_API_KEY }}
104+
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
105+
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
103106
run: pytest tests/iotools --cov=./ --cov-report=xml --remote-data
104107

105108
- name: Upload coverage to Codecov

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false # don't cancel other matrix jobs when one fails
1313
matrix:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1616
environment-type: [conda, bare]
1717
suffix: [''] # placeholder as an alternative to "-min"
1818
include:

.github/workflows/top-ranked-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
3232
- name: Run update_top_ranking_issues.py
3333
run: |
34-
python ./scripts/update_top_ranking_issues.py
34+
python .github/workflows/update_top_ranking_issues.py
File renamed without changes.

ci/requirements-py3.14.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test_env
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- coveralls
7+
- cython
8+
- ephem
9+
- h5py
10+
# - numba # not available for py 3.14 as of 2025-11-03
11+
- numpy >= 1.21.2
12+
- pandas >= 1.3.3
13+
- pip
14+
- pytest
15+
- pytest-cov
16+
- pytest-mock
17+
- requests-mock
18+
- pytest-timeout
19+
- pytest-rerunfailures
20+
- conda-forge::pytest-remotedata # version in default channel is old
21+
- python=3.14
22+
- pytz
23+
- requests
24+
- scipy >= 1.7.2
25+
- statsmodels
26+
- pip:
27+
# - nrel-pysam>=2.0 # not available for py 3.14 as of 2025-11-03
28+
- solarfactors

docs/examples/irradiance-decomposition/plot_diffuse_fraction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# %%
4545
# pvlib Decomposition Functions
4646
# -----------------------------
47-
# Methods for separating DHI into diffuse and direct components include:
47+
# Methods for separating GHI into diffuse and direct components include:
4848
# `DISC`_, `DIRINT`_, `Erbs`_, and `Boland`_.
4949

5050
# %%
@@ -112,7 +112,7 @@
112112
# ----------------
113113
# In the plots below we compare the four decomposition models to the TMY3 file
114114
# for Greensboro, North Carolina. We also compare the clearness index, kt, with
115-
# GHI normalized by a reference irradiance, E0 = 1000 [W/m^2], to highlight
115+
# GHI normalized by a reference irradiance, E0 = 1000 [Wm⁻²], to highlight
116116
# spikes caused when cosine of zenith approaches zero, particularly at sunset.
117117
#
118118
# First we combine the dataframes for the decomposition models and the TMY3

docs/examples/shading/plot_simple_irradiance_adjustment_for_horizon_shading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# After location information and a date range is established, solar position
1515
# data is calculated using :py:func:`pvlib.solarposition.get_solarposition`.
1616
# Horizon data is assigned, and interpolated to the solar azimuth time
17-
# series data. Finally, in times when solar elevation is greater than the
17+
# series data. Finally, in times when solar elevation is less than the
1818
# interpolated horizon elevation angle, DNI is set to 0.
1919

2020
import numpy as np

docs/examples/spectrum/average_photon_energy.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# This example demonstrates how to use the
1212
# :py:func:`~pvlib.spectrum.average_photon_energy` function to calculate the
1313
# Average Photon Energy (APE, :math:`\overline{E_\gamma}`) of spectral
14-
# irradiance distributions. This example uses spectral irradiance simulated
15-
# using :py:func:`~pvlib.spectrum.spectrl2`, but the same method is
14+
# irradiance distributions. This example uses clearsky spectral irradiance
15+
# simulated using :py:func:`~pvlib.spectrum.spectrl2`, but the same method is
1616
# applicable to spectral irradiance from any source.
1717
# More information on the SPECTRL2 model can be found in [1]_.
1818
# The APE parameter is a useful indicator of the overall shape of the solar
@@ -35,18 +35,19 @@
3535
from pvlib import spectrum, solarposition, irradiance, atmosphere
3636

3737
lat, lon = 39.742, -105.18 # NREL SRRL location
38-
tilt = 25
39-
azimuth = 180 # south-facing system
38+
surface_tilt = 25
39+
surface_azimuth = 180 # south-facing system
4040
pressure = 81190 # at 1828 metres AMSL, roughly
41-
water_vapor_content = 0.5 # cm
42-
tau500 = 0.1
41+
precipitable_water = 0.5 # cm
42+
aerosol_turbidity_500nm = 0.1
4343
ozone = 0.31 # atm-cm
4444
albedo = 0.2
4545

4646
times = pd.date_range('2023-01-01 08:00', freq='h', periods=9,
4747
tz='America/Denver')
4848
solpos = solarposition.get_solarposition(times, lat, lon)
49-
aoi = irradiance.aoi(tilt, azimuth, solpos.apparent_zenith, solpos.azimuth)
49+
aoi = irradiance.aoi(surface_tilt, surface_azimuth,
50+
solpos.apparent_zenith, solpos.azimuth)
5051

5152
relative_airmass = atmosphere.get_relative_airmass(solpos.apparent_zenith,
5253
model='kastenyoung1989')
@@ -64,13 +65,13 @@
6465
spectra_components = spectrum.spectrl2(
6566
apparent_zenith=solpos.apparent_zenith,
6667
aoi=aoi,
67-
surface_tilt=tilt,
68+
surface_tilt=surface_tilt,
6869
ground_albedo=albedo,
6970
surface_pressure=pressure,
7071
relative_airmass=relative_airmass,
71-
precipitable_water=water_vapor_content,
72+
precipitable_water=precipitable_water,
7273
ozone=ozone,
73-
aerosol_turbidity_500nm=tau500,
74+
aerosol_turbidity_500nm=aerosol_turbidity_500nm,
7475
)
7576

7677
# %%

docs/examples/system-models/plot_oedi_9068.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@
143143

144144
keys = ['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed',
145145
'albedo', 'precipitable_water']
146-
psm3, psm3_metadata = pvlib.iotools.get_psm3(latitude, longitude, api_key,
147-
email, interval=5, names=2019,
148-
map_variables=True, leap_day=True,
149-
attributes=keys)
146+
psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude,
147+
api_key, email,
148+
year=2019, interval=5,
149+
parameters=keys,
150+
map_variables=True,
151+
leap_day=True)
150152

151153
# %%
152154
# Pre-generate some model inputs

docs/sphinx/source/reference/iotools.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ Satellite-derived irradiance and weather data for the Americas.
8181
iotools.get_nsrdb_psm4_conus
8282
iotools.get_nsrdb_psm4_full_disc
8383
iotools.read_nsrdb_psm4
84-
iotools.get_psm3
85-
iotools.read_psm3
86-
iotools.parse_psm3
8784

8885

8986
Commercial datasets
@@ -237,6 +234,17 @@ lower quality.
237234
iotools.read_crn
238235

239236

237+
ECMWF ERA5
238+
^^^^^^^^^^
239+
240+
A global reanalysis dataset providing weather and solar resource data.
241+
242+
.. autosummary::
243+
:toctree: generated/
244+
245+
iotools.get_era5
246+
247+
240248
Generic data file readers
241249
-------------------------
242250

0 commit comments

Comments
 (0)