Skip to content

Commit

Permalink
Miscellaneous updates to spectrl2 gallery example (#2208)
Browse files Browse the repository at this point in the history
* correct doi role

* (possible?) clarification to wording

* move references

* Update plot_spectrl2_fig51A.py

* linter
  • Loading branch information
RDaxini authored Sep 11, 2024
1 parent 3837f54 commit def8c87
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/examples/spectrum/plot_spectrl2_fig51A.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
# This example recreates an example figure from the SPECTRL2 NREL Technical
# Report [1]_. The figure shows modeled spectra at hourly intervals across
# a single morning.
#
# References
# ----------
# .. [1] Bird, R, and Riordan, C., 1984, "Simple solar spectral model for
# direct and diffuse irradiance on horizontal and tilted planes at the
# earth's surface for cloudless atmospheres", NREL Technical Report
# TR-215-2436 doi:10.2172/5986936.

# %%
# The SPECTRL2 model has several inputs; some can be calculated with pvlib,
Expand Down Expand Up @@ -53,9 +46,10 @@

# %%
# With all the necessary inputs in hand we can model spectral irradiance using
# :py:func:`pvlib.spectrum.spectrl2`. Note that because we are calculating
# the spectra for more than one set of conditions, we will get back 2-D
# arrays (one dimension for wavelength, one for time).
# :py:func:`pvlib.spectrum.spectrl2`. Note that because we are calculating
# the spectra for more than one set of conditions, the spectral irradiance
# components will be returned in a dictionary as 2-D arrays, with one dimension
# for wavelength and one for time.

spectra = spectrum.spectrl2(
apparent_zenith=solpos.apparent_zenith,
Expand Down Expand Up @@ -95,3 +89,11 @@
# position and the solar position calculation in the technical report does not
# exactly match the one used here. However, the differences are minor enough
# to not materially change the spectra.

# %%
# References
# ----------
# .. [1] Bird, R, and Riordan, C., 1984, "Simple solar spectral model for
# direct and diffuse irradiance on horizontal and tilted planes at the
# earth's surface for cloudless atmospheres", NREL Technical Report
# TR-215-2436 :doi:`10.2172/5986936`

0 comments on commit def8c87

Please sign in to comment.