From def8c8778ed0abc6e1184ffabd72ca258fe1449a Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:46:04 +0100 Subject: [PATCH] Miscellaneous updates to spectrl2 gallery example (#2208) * correct doi role * (possible?) clarification to wording * move references * Update plot_spectrl2_fig51A.py * linter --- .../examples/spectrum/plot_spectrl2_fig51A.py | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/examples/spectrum/plot_spectrl2_fig51A.py b/docs/examples/spectrum/plot_spectrl2_fig51A.py index 6f3470a246..0a921aaf79 100644 --- a/docs/examples/spectrum/plot_spectrl2_fig51A.py +++ b/docs/examples/spectrum/plot_spectrl2_fig51A.py @@ -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, @@ -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, @@ -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`