diff --git a/docs/sphinx/source/user_guide/nomenclature.rst b/docs/sphinx/source/user_guide/nomenclature.rst index a89da06cbf..180f0a298f 100644 --- a/docs/sphinx/source/user_guide/nomenclature.rst +++ b/docs/sphinx/source/user_guide/nomenclature.rst @@ -142,6 +142,13 @@ There is a convention on consistent variable names throughout the library: solar_zenith Zenith angle of the sun in degrees + spectra + spectra_components + Spectral irradiance (components) [Wm⁻²nm⁻¹]. The amount of energy + incident on a unit area per unit time and per unit + wavelength. As with broadband irradiance, global spectral irradiance + is composed of direct and diffuse components. + surface_azimuth Azimuth angle of the surface diff --git a/docs/sphinx/source/whatsnew/v0.11.2.rst b/docs/sphinx/source/whatsnew/v0.11.2.rst index f3b1ec338a..a07f4bf43d 100644 --- a/docs/sphinx/source/whatsnew/v0.11.2.rst +++ b/docs/sphinx/source/whatsnew/v0.11.2.rst @@ -33,6 +33,10 @@ Documentation page, using the sphinx glossary directive. (:issue:`1421`, :pull:`2234`) * Explained how to write docstrings for new functions in :ref:`example-docstring` (:discussion:`2081`, :pull:`2254`) +* Added the following variables to the :ref:`nomenclature` page: + + - `spectra` and `spectra_components` (:issue:`2150`, :pull:`2264`) + Testing ~~~~~~~ diff --git a/pvlib/spectrum/irradiance.py b/pvlib/spectrum/irradiance.py index cb3e5e1ddb..14b2da27ba 100644 --- a/pvlib/spectrum/irradiance.py +++ b/pvlib/spectrum/irradiance.py @@ -189,7 +189,8 @@ def average_photon_energy(spectra): ---------- spectra : pandas.Series or pandas.DataFrame - Spectral irradiance, must be positive. [Wm⁻²nm⁻¹] + Spectral irradiance, must be positive [Wm⁻²nm⁻¹]. + See :term:`spectra`. A single spectrum must be a :py:class:`pandas.Series` with wavelength [nm] as the index, while multiple spectra must be rows in a diff --git a/pvlib/spectrum/spectrl2.py b/pvlib/spectrum/spectrl2.py index b022d79371..38739efff3 100644 --- a/pvlib/spectrum/spectrl2.py +++ b/pvlib/spectrum/spectrl2.py @@ -228,10 +228,11 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo, Returns ------- spectra_components : dict - A dict of arrays. With the exception of `wavelength`, which has length + A dict of arrays. With the exception of `wavelength`, which has length 122, each array has shape (122, N) where N is the length of the input ``apparent_zenith``. All values are spectral irradiance with units Wm⁻²nm⁻¹, except for `wavelength`, which is in nanometers. + See :term:`spectra_components`. * wavelength * dni_extra