Skip to content

Update get_extra_radiation references #2437

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

Merged
merged 19 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from 17 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
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.12.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Documentation
* Add a supporting reference to :py:func:`pvlib.atmosphere.get_relative_airmass` (:issue:`2390`, :pull:`2424`)
* Documented how `np.nan` values are handled by :py:func:`~pvlib.spectrum.average_photon_energy`
(:issue:`2423`, :pull:`2426`)
* Update references in :py:func`~pvlib.irradiance.get_extra_radiation`
(:issue:`2333`, :pull:`2347`)

Testing
~~~~~~~
Expand Down
40 changes: 25 additions & 15 deletions pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,31 @@
method='spencer', epoch_year=2014, **kwargs):
"""
Determine extraterrestrial radiation from day of year.

Check failure on line 37 in pvlib/irradiance.py

View workflow job for this annotation

GitHub Actions / flake8-linter

W293 blank line contains whitespace
Specific references for each method of caclulating the earth-sun distance
are cited in the parameter descriptions below, while a more general
discussion of the different models may also be found in [1]_ and [2]_.

Parameters
----------
datetime_or_doy : numeric, array, date, datetime, Timestamp, DatetimeIndex
Day of year, array of days of year, or datetime-like object

solar_constant : float, default 1366.1
The solar constant.
The solar constant. [Wm⁻²]

method : string, default 'spencer'
The method by which the ET radiation should be calculated.
Options include ``'pyephem', 'spencer', 'asce', 'nrel'``.
method : string, default `spencer`
The method by which the extraterrestrial radiation should be
calculated. Options include: `pyephem`, `spencer` [3]_, `asce` [4]_,
'nrel' [6]_.

epoch_year : int, default 2014
The year in which a day of year input will be calculated. Only
applies to day of year input used with the pyephem or nrel
applies to day of year input used with the `pyephem` or `nrel`
methods.

kwargs :
Passed to solarposition.nrel_earthsun_distance
Passed to :py:func:`~pvlib.solarposition.nrel_earthsun_distance`.

Returns
-------
Expand All @@ -68,19 +73,24 @@
.. [1] M. Reno, C. Hansen, and J. Stein, "Global Horizontal Irradiance
Clear Sky Models: Implementation and Analysis", Sandia National
Laboratories, SAND2012-2389, 2012.
:doi:`10.2172/1039404`

.. [2] http://solardata.uoregon.edu/SolarRadiationBasics.html, Eqs.
SR1 and SR2
.. [2] J. A. Duffie, W. A. Beckman, N. Blair, "Solar Radiation", in Solar
Engineering of Thermal Processes, Photovoltaics and Wind, 5th ed,
New York, USA: J. Wiley and Sons, 2020, pp. 3-44.
:doi:`10.1002/9781119540328`

.. [3] Partridge, G. W. and Platt, C. M. R. 1976. Radiative Processes
in Meteorology and Climatology.
.. [3] J. W. Spencer, "Fourier series representation of the sun," Search,
vol. 2, p. 172, 1971.

.. [4] Duffie, J. A. and Beckman, W. A. 1991. Solar Engineering of
Thermal Processes, 2nd edn. J. Wiley and Sons, New York.
.. [4] R. G. Allen, Environmental, and E. Water Resources institute. Task
Committee on Standardization of Reference, The ASCE standardized
reference evapotranspiration equation. Reston, Va.: American Society of
Civil Engineers, 2005. :doi:`10.1061/9780784408056`

.. [5] ASCE, 2005. The ASCE Standardized Reference Evapotranspiration
Equation, Environmental and Water Resources Institute of the American
Civil Engineers, Ed. R. G. Allen et al.
.. [6] I. Reda, A. Andreas, "Solar position algorithm for solar
radiation applications" NREL Golden, USA. NREL/TP-560-34302,
Revised 2008. :doi:`10.2172/15003974`
"""

to_doy, to_datetimeindex, to_output = \
Expand Down
Loading