Skip to content

Commit afe92db

Browse files
authored
Merge branch 'main' into ross-k
2 parents fd72680 + 2aa17b4 commit afe92db

17 files changed

Lines changed: 1116 additions & 37 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ jobs:
4040

4141
- name: Install Conda environment with Micromamba
4242
if: matrix.environment-type == 'conda'
43-
uses: mamba-org/setup-micromamba@v1
43+
uses: mamba-org/setup-micromamba@v2
4444
with:
4545
environment-file: ${{ env.REQUIREMENTS }}
46-
cache-downloads: true
46+
cache-downloads: false
47+
cache-environment: false
4748
create-args: >-
4849
python=${{ matrix.python-version }}
4950
condarc: |

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Installation
7474
============
7575

7676
pvlib-python releases may be installed using the ``pip`` and ``conda`` tools.
77+
```bash
78+
pip install pvlib
79+
conda install -c conda-forge pvlib
80+
```
7781
Please see the [Installation page](https://pvlib-python.readthedocs.io/en/stable/user_guide/getting_started/installation.html) of the documentation for complete instructions.
7882

7983

docs/sphinx/source/reference/iotools.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ Commercial datasets
9292
Accessing these APIs typically requires payment.
9393
Datasets provide near-global coverage.
9494

95+
Meteonorm
96+
*********
97+
98+
.. autosummary::
99+
:toctree: generated/
100+
101+
iotools.get_meteonorm_forecast_basic
102+
iotools.get_meteonorm_forecast_precision
103+
iotools.get_meteonorm_observation_training
104+
iotools.get_meteonorm_observation_realtime
105+
iotools.get_meteonorm_tmy
106+
107+
95108
SolarAnywhere
96109
*************
97110

docs/sphinx/source/user_guide/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This user guide is an overview and explains some of the key features of pvlib.
2121
modeling_topics/pvsystem
2222
modeling_topics/modelchain
2323
modeling_topics/timetimezones
24+
modeling_topics/spectrum
2425
modeling_topics/bifacial
2526
modeling_topics/clearsky
2627
modeling_topics/weather_data
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
.. _spectrum_user_guide:
2+
.. currentmodule:: pvlib.spectrum
3+
4+
5+
Spectrum
6+
========
7+
8+
The spectrum functionality of pvlib-python includes simulating clear sky
9+
spectral irradiance curves, calculating the spectral mismatch factor for
10+
a range of single-junction PV cell technologies, and other calculations
11+
such as converting between spectral response and EQE, and computing average
12+
photon energy values from spectral irradiance data.
13+
14+
This user guide page summarizes some of pvlib-python's spectrum-related
15+
capabilities, starting with a summary of spectral mismatch estimation models
16+
available in pvlib-python.
17+
18+
19+
Spectral mismatch models
20+
------------------------
21+
The spectral mismatch factor is the ratio of a PV device's response under a
22+
given spectrum to its response under a reference spectrum, typically the
23+
AM1.5G spectrum. It represents the relative difference in the performance of
24+
a PV device under a spectrum different from the reference spectrum, and can be
25+
used to correct the measured power output of a PV system for spectral effects.
26+
27+
pvlib-python contains several models to estimate the spectral mismatch factor
28+
using atmospheric variables such as air mass, or calculate it exactly using
29+
system and meteorological data such as spectral response and spectral
30+
irradiance. Examples demonstrating the application of several spectral
31+
mismatch models using pvlib-python are also available:
32+
:ref:`sphx_glr_gallery_spectrum_spectral_factor.py` and Reference [1]_, the
33+
latter of which also contains downloadable spectral response and spectral
34+
irradiance data.
35+
36+
The table below summarizes the models currently available in pvlib, their
37+
required inputs, cell technologies for which model coefficients have been
38+
published, and references. Note that while most models are validated for
39+
specific cell technologies, the Sandia Array Performance Model (SAPM) is
40+
validated for a range of commercial modules. An extended review of a
41+
wider range of models available in the published literature may be found in
42+
Reference [2]_.
43+
44+
45+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
46+
| Model | Inputs | Default parameter availability | Reference |
47+
+ + +---------+---------+------+------+------+------------+ +
48+
| | | mono-Si | poly-Si | CdTe | CIGS | a-Si | perovskite | |
49+
+=====================================================+=============================+=========+=========+======+======+======+============+===========+
50+
| :py:func:`Caballero <spectral_factor_caballero>` | :term:`airmass_absolute`, | | | | | | | |
51+
| +-----------------------------+ | | | | | | |
52+
| |:term:`precipitable_water`, ||||||| [2]_ |
53+
| +-----------------------------+ | | | | | | |
54+
| | :term:`aod` | | | | | | | |
55+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
56+
| :py:func:`First Solar <spectral_factor_firstsolar>` | :term:`airmass_absolute`, | | | | | | | |
57+
| +-----------------------------+ ||| | | | [3]_ |
58+
| | :term:`precipitable_water` | | | | | | | |
59+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
60+
| :py:func:`JRC <spectral_factor_jrc>` | :term:`airmass_relative`, | | | | | | | |
61+
| +-----------------------------+ ||| | | + [4]_ |
62+
| | :term:`clearsky_index` | | | | | | | |
63+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
64+
| :py:func:`PVSPEC <spectral_factor_pvspec>` | :term:`airmass_absolute`, | | | | | | | |
65+
| +-----------------------------+||||| | [5]_ |
66+
| | :term:`clearsky_index` | | | | | | | |
67+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
68+
| :py:func:`SAPM <spectral_factor_sapm>` | :term:`airmass_absolute` | | | | | | | [6]_ |
69+
+-----------------------------------------------------+-----------------------------+---------+---------+------+------+------+------------+-----------+
70+
71+
72+
References
73+
----------
74+
.. [1] A. Driesse, J. S. Stein, and M. Theristis, "Global horizontal spectral
75+
irradiance and module spectral response measurements: an open dataset
76+
for PV research Sandia National Laboratories, ALbuquerque, NM, USA, Rep.
77+
SAND2023-02045, 2023. Available:
78+
https://datahub.duramat.org/dataset/module-sr-library
79+
.. [2] R. Daxini and Y. Wu, "Review of methods to account for the solar
80+
spectral influence on photovoltaic device performance," Energy,
81+
vol. 286, p. 129461, Jan. 2024. :doi:`10.1016/j.energy.2023.129461`
82+
.. [3] J. A. Caballero, E. Fernández, M. Theristis, F. Almonacid, and
83+
G. Nofuentes, "Spectral Corrections Based on Air Mass, Aerosol Optical
84+
Depth and Precipitable Water for PV Performance Modeling," IEEE Journal
85+
of Photovoltaics, vol. 8, no. 2, pp. 552–558, Mar. 2018.
86+
:doi:`10.1109/JPHOTOV.2017.2787019`
87+
.. [4] S. Pelland, J. Remund, and J. Kleissl, "Development and Testing of the
88+
PVSPEC Model of Photovoltaic Spectral Mismatch Factor," in Proc. 2020
89+
IEEE 47th Photovoltaic Specialists Conference (PVSC), Calgary, AB,
90+
Canada, 2020, pp. 1–6. :doi:`10.1109/PVSC45281.2020.9300932`
91+
.. [5] D. L. King, W. E. Boyson, and J. A. Kratochvil, Photovoltaic Array
92+
Performance Model, Sandia National Laboratories, Albuquerque, NM, USA,
93+
Tech. Rep. SAND2004-3535, Aug. 2004. :doi:`10.2172/919131`
94+
.. [6] M. Lee and A. Panchula, "Spectral Correction for Photovoltaic Module
95+
Performance Based on Air Mass and Precipitable Water," 2016 IEEE 43rd
96+
Photovoltaic Specialists Conference (PVSC), Portland, OR, USA, 2016,
97+
pp. 3696-3699. :doi:`10.1109/PVSC.2016.7749836`
98+
.. [7] H. Thomas, S. Tony, and D. Ewan, “A Simple Model for Estimating the
99+
Influence of Spectrum Variations on PV Performance,” pp. 3385–3389, Nov.
100+
2009, :doi:`10.4229/24THEUPVSEC2009-4AV.3.27`
101+
.. [8] IEC 60904-7:2019, Photovoltaic devices — Part 7: Computation of the
102+
spectral mismatch correction for measurements of photovoltaic devices,
103+
International Electrotechnical Commission, Geneva, Switzerland, 2019.

docs/sphinx/source/whatsnew/v0.13.1.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,26 @@ Enhancements
2424
(:issue:`2479`, :pull:`2480`)
2525
* Add k coefficient in :py:func:`~pvlib.temperature.ross`
2626
(:issue:`2506`, :pull:`2521`)
27+
* Add iotools functions to retrieve irradiance and weather data from Meteonorm:
28+
:py:func:`~pvlib.iotools.get_meteonorm_forecast_basic`, :py:func:`~pvlib.iotools.get_meteonorm_forecast_precision`,
29+
:py:func:`~pvlib.iotools.get_meteonorm_observation_realtime`, :py:func:`~pvlib.iotools.get_meteonorm_observation_training`,
30+
and :py:func:`~pvlib.iotools.get_meteonorm_tmy`.
31+
(:pull:`2499`)
2732
* Add :py:func:`pvlib.iotools.get_nasa_power` to retrieve data from NASA POWER free API.
2833
(:pull:`2500`)
2934
* :py:func:`pvlib.spectrum.spectral_factor_firstsolar` no longer emits warnings
3035
when airmass and precipitable water values fall out of range. (:pull:`2512`)
36+
* Allows reading TMY data from a Path or file-like object in :py:func:`~pvlib.iotools.read_tmy3`.
37+
(:pull:`2544`, :ghuser:`jerluc`)
3138

3239
Documentation
3340
~~~~~~~~~~~~~
3441
* Substantiate definitions of solar/surface azimuth/zenith and aoi on the
3542
:ref:`nomenclature` page. (:issue:`2448`, :pull:`2503`)
43+
* Add a new reference page for the spectrum (:ref:`_spectrum_user_guide`) to the
44+
Modeling Topics section of the user guide, documenting pvlib-python's spectrum
45+
functionality, which includes a comparison table of spectral mismatch estimation
46+
models. (:issue:`2329`, :pull:`2353`)
3647

3748

3849
Testing
@@ -60,3 +71,4 @@ Contributors
6071
* Omar Bahamida (:ghuser:`OmarBahamida`)
6172
* Rodrigo Amaro e Silva (:ghuser:`ramaroesilva`)
6273
* Kevin Anderson (:ghuser:`kandersolar`)
74+
* Mikaella Brewer (:ghuser:`brwerx`)

pvlib/inverter.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ def sandia(v_dc, p_dc, inverter):
114114
References
115115
----------
116116
.. [1] D. King, S. Gonzalez, G. Galbraith, W. Boyson, "Performance Model
117-
for Grid-Connected Photovoltaic Inverters", SAND2007-5036, Sandia
118-
National Laboratories.
119-
117+
for Grid-Connected Photovoltaic Inverters", Sandia National
118+
Laboratories, Albuquerque, N.M., USA, SAND2007-5036, Sept. 2007.
119+
:doi:`10.2172/920449`
120120
.. [2] System Advisor Model web page. https://sam.nrel.gov.
121121
122122
See also
@@ -176,11 +176,13 @@ def sandia_multi(v_dc, p_dc, inverter):
176176
References
177177
----------
178178
.. [1] D. King, S. Gonzalez, G. Galbraith, W. Boyson, "Performance Model
179-
for Grid-Connected Photovoltaic Inverters", SAND2007-5036, Sandia
180-
National Laboratories.
179+
for Grid-Connected Photovoltaic Inverters", Sandia National
180+
Laboratories, Albuquerque, N.M., USA, SAND2007-5036, Sept. 2007.
181+
:doi:`10.2172/920449`
181182
.. [2] C. Hansen, J. Johnson, R. Darbali-Zamora, N. Gurule. "Modeling
182183
Efficiency Of Inverters With Multiple Inputs", 49th IEEE Photovoltaic
183184
Specialist Conference, Philadelphia, PA, USA. June 2022.
185+
:doi:`10.1109/PVSC48317.2022.9938490`
184186
185187
See also
186188
--------
@@ -272,6 +274,7 @@ def adr(v_dc, p_dc, inverter, vtol=0.10):
272274
.. [1] A. Driesse, "Beyond the Curves: Modeling the Electrical Efficiency
273275
of Photovoltaic Inverters", 33rd IEEE Photovoltaic Specialist
274276
Conference (PVSC), June 2008
277+
:doi:`10.1109/PVSC.2008.4922827`
275278
276279
See also
277280
--------
@@ -487,8 +490,9 @@ def fit_sandia(ac_power, dc_power, dc_voltage, dc_voltage_level, p_ac_0, p_nt):
487490
References
488491
----------
489492
.. [1] D. King, S. Gonzalez, G. Galbraith, W. Boyson, "Performance Model
490-
for Grid-Connected Photovoltaic Inverters", SAND2007-5036, Sandia
491-
National Laboratories.
493+
for Grid-Connected Photovoltaic Inverters", Sandia National
494+
Laboratories, Albuquerque, N.M., USA, SAND2007-5036, Sept. 2007.
495+
:doi:`10.2172/920449`
492496
.. [2] Sandia Inverter Model page, PV Performance Modeling Collaborative
493497
https://pvpmc.sandia.gov/modeling-steps/dc-to-ac-conversion/sandia-inverter-model/
494498
.. [3] W. Bower, et al., "Performance Test Protocol for Evaluating

pvlib/iotools/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,9 @@
3939
from pvlib.iotools.solcast import get_solcast_historic # noqa: F401
4040
from pvlib.iotools.solcast import get_solcast_tmy # noqa: F401
4141
from pvlib.iotools.solargis import get_solargis # noqa: F401
42+
from pvlib.iotools.meteonorm import get_meteonorm_forecast_basic # noqa: F401
43+
from pvlib.iotools.meteonorm import get_meteonorm_forecast_precision # noqa: F401, E501
44+
from pvlib.iotools.meteonorm import get_meteonorm_observation_realtime # noqa: F401, E501
45+
from pvlib.iotools.meteonorm import get_meteonorm_observation_training # noqa: F401, E501
46+
from pvlib.iotools.meteonorm import get_meteonorm_tmy # noqa: F401
4247
from pvlib.iotools.nasa_power import get_nasa_power # noqa: F401

0 commit comments

Comments
 (0)