|
4 | 4 | """ |
5 | 5 |
|
6 | 6 | import pvlib |
7 | | -from pvlib._deprecation import deprecated |
8 | 7 | import numpy as np |
9 | 8 | import pandas as pd |
10 | 9 | from pathlib import Path |
|
13 | 12 | from scipy.integrate import trapezoid |
14 | 13 |
|
15 | 14 |
|
16 | | -@deprecated( |
17 | | - since="0.11", |
18 | | - removal="0.12", |
19 | | - name="pvlib.spectrum.get_am15g", |
20 | | - alternative="pvlib.spectrum.get_reference_spectra", |
21 | | - addendum=( |
22 | | - "The new function reads more data. Use it with " |
23 | | - + "standard='ASTM G173-03' and extract the 'global' column." |
24 | | - ), |
25 | | -) |
26 | | -def get_am15g(wavelength=None): |
27 | | - r""" |
28 | | - Read the ASTM G173-03 AM1.5 global spectrum on a 37-degree tilted surface, |
29 | | - optionally interpolated to the specified wavelength(s). |
30 | | -
|
31 | | - Global (tilted) irradiance includes direct and diffuse irradiance from sky |
32 | | - and ground reflections, and is more formally called hemispherical |
33 | | - irradiance (on a tilted surface). In the context of photovoltaic systems |
34 | | - the irradiance on a flat receiver is frequently called plane-of-array (POA) |
35 | | - irradiance. |
36 | | -
|
37 | | - Parameters |
38 | | - ---------- |
39 | | - wavelength: 1-D sequence of numeric, optional |
40 | | - Wavelengths at which the spectrum is interpolated. |
41 | | - By default the 2002 wavelengths of the standard are returned. [nm]. |
42 | | -
|
43 | | - Returns |
44 | | - ------- |
45 | | - am15g: pandas.Series |
46 | | - The AM1.5g standard spectrum indexed by ``wavelength``. [W/(m²nm)]. |
47 | | -
|
48 | | - Notes |
49 | | - ----- |
50 | | - If ``wavelength`` is specified this function uses linear interpolation. |
51 | | -
|
52 | | - If the values in ``wavelength`` are too widely spaced, the integral of the |
53 | | - spectrum may deviate from the standard value of 1000.37 W/m². |
54 | | -
|
55 | | - The values in the data file provided with pvlib-python are copied from an |
56 | | - Excel file distributed by NREL, which is found here: |
57 | | - https://www.nrel.gov/grid/solar-resource/assets/data/astmg173.xls |
58 | | -
|
59 | | - More information about reference spectra is found here: |
60 | | - https://www.nrel.gov/grid/solar-resource/spectra-am1.5.html |
61 | | -
|
62 | | - See Also |
63 | | - -------- |
64 | | - pvlib.spectrum.get_reference_spectra : reads also the direct and |
65 | | - extraterrestrial components of the spectrum. |
66 | | -
|
67 | | - References |
68 | | - ---------- |
69 | | - .. [1] ASTM "G173-03 Standard Tables for Reference Solar Spectral |
70 | | - Irradiances: Direct Normal and Hemispherical on 37° Tilted Surface." |
71 | | - """ # noqa: E501 |
72 | | - # Contributed by Anton Driesse (@adriesse), PV Performance Labs. Aug. 2022 |
73 | | - # modified by @echedey-ls, as a wrapper of spectrum.get_reference_spectra |
74 | | - standard = get_reference_spectra(wavelength, standard="ASTM G173-03") |
75 | | - return standard["global"] |
76 | | - |
77 | | - |
78 | 15 | def get_reference_spectra(wavelengths=None, standard="ASTM G173-03"): |
79 | 16 | r""" |
80 | 17 | Read a standard spectrum specified by ``standard``, optionally |
|
0 commit comments