Skip to content

Commit f7904de

Browse files
authored
Merge branch 'main' into add_marion
2 parents 6624239 + b70fb0f commit f7904de

Some content is hidden

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

52 files changed

+1044
-693
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. currentmodule:: pvlib
2+
3+
Angle of incidence
4+
------------------
5+
6+
.. autosummary::
7+
:toctree: ../generated/
8+
9+
irradiance.aoi
10+
irradiance.aoi_projection

docs/sphinx/source/reference/irradiance/class-methods.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/sphinx/source/reference/irradiance/clearness-index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. currentmodule:: pvlib
22

3-
Clearness index models
4-
----------------------
3+
Clearness and clearsky index
4+
----------------------------
55

66
.. autosummary::
77
:toctree: ../generated/

docs/sphinx/source/reference/irradiance/components.rst

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)