Skip to content

Commit afdcdd4

Browse files
RDaxinikandersolar
andauthored
add spectra and spectra_components to nomenclature page (#2264)
* Update variables_style_rules.csv * Update v0.11.2.rst * not sure what happened here after merge with main * Update v0.11.2.rst * update whatsnew and glossary page * Update spectrl2.py * Update irradiance.py * typo * update spectrl2.py and spectrum irradiance.py * grammar -- periods before/after units(?) * Apply suggestions from code review Co-authored-by: Kevin Anderson <[email protected]> * Update v0.11.2.rst * fix whatsnew formatting * formatting attempt #2 --------- Co-authored-by: Kevin Anderson <[email protected]>
1 parent a6995c3 commit afdcdd4

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

docs/sphinx/source/user_guide/nomenclature.rst

+7
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ There is a convention on consistent variable names throughout the library:
142142
solar_zenith
143143
Zenith angle of the sun in degrees
144144

145+
spectra
146+
spectra_components
147+
Spectral irradiance (components) [Wm⁻²nm⁻¹]. The amount of energy
148+
incident on a unit area per unit time and per unit
149+
wavelength. As with broadband irradiance, global spectral irradiance
150+
is composed of direct and diffuse components.
151+
145152
surface_azimuth
146153
Azimuth angle of the surface
147154

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

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Documentation
3333
page, using the sphinx glossary directive. (:issue:`1421`, :pull:`2234`)
3434
* Explained how to write docstrings for new functions in :ref:`example-docstring`
3535
(:discussion:`2081`, :pull:`2254`)
36+
* Added the following variables to the :ref:`nomenclature` page:
37+
38+
- `spectra` and `spectra_components` (:issue:`2150`, :pull:`2264`)
39+
3640

3741
Testing
3842
~~~~~~~

pvlib/spectrum/irradiance.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def average_photon_energy(spectra):
189189
----------
190190
spectra : pandas.Series or pandas.DataFrame
191191
192-
Spectral irradiance, must be positive. [Wm⁻²nm⁻¹]
192+
Spectral irradiance, must be positive [Wm⁻²nm⁻¹].
193+
See :term:`spectra`.
193194
194195
A single spectrum must be a :py:class:`pandas.Series` with wavelength
195196
[nm] as the index, while multiple spectra must be rows in a

pvlib/spectrum/spectrl2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,11 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
228228
Returns
229229
-------
230230
spectra_components : dict
231-
A dict of arrays. With the exception of `wavelength`, which has length
231+
A dict of arrays. With the exception of `wavelength`, which has length
232232
122, each array has shape (122, N) where N is the length of the
233233
input ``apparent_zenith``. All values are spectral irradiance
234234
with units Wm⁻²nm⁻¹, except for `wavelength`, which is in nanometers.
235+
See :term:`spectra_components`.
235236
236237
* wavelength
237238
* dni_extra

0 commit comments

Comments
 (0)