Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous updates to spectrl2 gallery example #2208

Merged
merged 5 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Loading