Skip to content

Commit 9dfcf45

Browse files
RDaxinicwhansekandersolarechedey-ls
authored
Miscellaneous improvements to spectrl2 docstring (#2168)
* Update spectrl2.py Co-Authored-By: Cliff Hansen <[email protected]> * Update spectrl2.py * Update spectrl2.py Co-Authored-By: Kevin Anderson <[email protected]> * Update spectrl2.py proposal for a few minor changes * Update spectrl2.py Co-Authored-By: Echedey Luis <[email protected]> --------- Co-authored-by: Cliff Hansen <[email protected]> Co-authored-by: Kevin Anderson <[email protected]> Co-authored-by: Echedey Luis <[email protected]>
1 parent e59d2b8 commit 9dfcf45

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

pvlib/spectrum/spectrl2.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -181,39 +181,39 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
181181
(SPECTRL2).
182182
183183
The Bird Simple Spectral Model [1]_ produces terrestrial spectra between
184-
300 and 4000 nm with a resolution of approximately 10 nm. Direct and
184+
300 nm and 4000 nm with a resolution of approximately 10 nm. Direct and
185185
diffuse spectral irradiance are modeled for horizontal and tilted surfaces
186186
under cloudless skies. SPECTRL2 models radiative transmission, absorption,
187187
and scattering due to atmospheric aerosol, water vapor, and ozone content.
188188
189189
Parameters
190190
----------
191191
apparent_zenith : numeric
192-
Solar zenith angle [degrees]
192+
Solar zenith angle. [degrees]
193193
aoi : numeric
194-
Angle of incidence of the solar vector on the panel [degrees]
194+
Angle of incidence of the solar vector on the panel. [degrees]
195195
surface_tilt : numeric
196-
Panel tilt from horizontal [degrees]
196+
Panel tilt from horizontal. [degrees]
197197
ground_albedo : numeric
198198
Albedo [0-1] of the ground surface. Can be provided as a scalar value
199199
if albedo is not spectrally-dependent, or as a 122xN matrix where
200200
the first dimension spans the wavelength range and the second spans
201201
the number of simulations. [unitless]
202202
surface_pressure : numeric
203-
Surface pressure [Pa]
203+
Surface pressure. [Pa]
204204
relative_airmass : numeric
205205
Relative airmass. The airmass model used in [1]_ is the `'kasten1966'`
206206
model, while a later implementation by NREL uses the
207207
`'kastenyoung1989'` model. [unitless]
208208
precipitable_water : numeric
209-
Atmospheric water vapor content [cm]
209+
Atmospheric water vapor content. [cm]
210210
ozone : numeric
211-
Atmospheric ozone content [atm-cm]
211+
Atmospheric ozone content. [atm-cm]
212212
aerosol_turbidity_500nm : numeric
213-
Aerosol turbidity at 500 nm [unitless]
213+
Aerosol turbidity at 500 nm. [unitless]
214214
dayofyear : numeric, optional
215-
The day of year [1-365]. Must be provided if ``apparent_zenith`` is
216-
not a pandas Series.
215+
The day of year [1-365]. Must be provided if ``apparent_zenith`` is
216+
not a ``pandas.Series``.
217217
scattering_albedo_400nm : numeric, default 0.945
218218
Aerosol single scattering albedo at 400nm. The default value of 0.945
219219
is suggested in [1]_ for a rural aerosol model. [unitless]
@@ -223,15 +223,15 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
223223
wavelength_variation_factor : numeric, default 0.095
224224
Wavelength variation factor [unitless]
225225
aerosol_asymmetry_factor : numeric, default 0.65
226-
Aerosol asymmetry factor (mean cosine of scattering angle) [unitless]
226+
Aerosol asymmetry factor (mean cosine of scattering angle). [unitless]
227227
228228
Returns
229229
-------
230-
spectra : dict
230+
spectra_components : dict
231231
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
234-
with units W/m^2/nm except for `wavelength`, which is in nanometers.
234+
with units Wm⁻²nm⁻¹, except for `wavelength`, which is in nanometers.
235235
236236
* wavelength
237237
* dni_extra
@@ -267,7 +267,7 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
267267
268268
References
269269
----------
270-
.. [1] Bird, R, and Riordan, C., 1984, "Simple solar spectral model for
270+
.. [1] Bird, R., and Riordan, C., 1984, "Simple solar spectral model for
271271
direct and diffuse irradiance on horizontal and tilted planes at the
272272
earth's surface for cloudless atmospheres", NREL Technical Report
273273
TR-215-2436 :doi:`10.2172/5986936`.
@@ -363,7 +363,7 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
363363

364364
# calculate spectral irradiance on a tilted surface, Eq 3-18
365365
# Note: clipping cosd(aoi) to >=0 is not in the reference, but is necessary
366-
# to prevent nonsense values when the sun is behind the plane of array.
366+
# to prevent negative values when the sun is behind the plane of array.
367367
# The same constraint is applied in irradiance.haydavies when not
368368
# supplying `projection_ratio`.
369369
aoi_projection_nn = np.maximum(cosd(aoi), 0) # GH 1348

0 commit comments

Comments
 (0)