Skip to content

Commit 0adb3be

Browse files
committed
Merge branch 'main' of https://github.com/pvlib/pvlib-python into golden_mpp
2 parents 2c8a925 + 6553710 commit 0adb3be

File tree

6 files changed

+26
-21
lines changed

6 files changed

+26
-21
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
# %%

tests/iotools/test_meteonorm.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def expected_meteonorm_data():
7272
[0.0, 0.0],
7373
[0.0, 0.0],
7474
[2.5, 2.68],
75-
[77.5, 77.47],
76-
[165.0, 164.98],
77-
[210.75, 210.74],
75+
[77.5, 77.48],
76+
[165.0, 164.99],
77+
[210.75, 210.75],
7878
[221.0, 220.99],
7979
]
8080
index = pd.date_range('2023-01-01 00:30', periods=12, freq='1h', tz='UTC')
@@ -207,7 +207,7 @@ def test_get_meteonorm_custom_horizon(demo_api_key, demo_url):
207207
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
208208
def test_get_meteonorm_forecast_HTTPError(demo_api_key, demo_url):
209209
with pytest.raises(
210-
HTTPError, match="unknown parameter: not_a_real_parameter"):
210+
HTTPError, match='invalid parameter "not_a_real_parameter"'):
211211
_ = pvlib.iotools.get_meteonorm_forecast_basic(
212212
latitude=50, longitude=10,
213213
start=pd.Timestamp.now(tz='UTC'),
@@ -265,9 +265,9 @@ def expected_meteonorm_tmy_data():
265265
[0.],
266266
[0.],
267267
[0.],
268-
[9.06],
269-
[8.43],
270-
[86.63],
268+
[9.07],
269+
[8.44],
270+
[86.64],
271271
[110.44],
272272
]
273273
index = pd.date_range(

tests/test_modelchain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def cec_dc_adr_ac_system(sam_data, cec_module_cs5p_220m,
139139
module=module_parameters['Name'],
140140
module_parameters=module_parameters,
141141
temperature_model_parameters=temp_model_params,
142-
inverter_parameters=inverter)
142+
inverter_parameters=inverter,
143+
modules_per_string=14)
143144
return system
144145

145146

0 commit comments

Comments
 (0)