Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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.6.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Bug fixes
near horizon. (:issue:`656`)
* Fixed numpy warnings in :py:func:`~pvlib.tracking.singleaxis` when
comparing NaN values to limits. (:issue:`622`)
* Fixed a bug in the day angle equation for the ASCE
extraterrestrial irradiance model. (:issue:`211`)
* Silenced divide by 0 irradiance warnings in
:py:func:`~pvlib.irradiance.klucher` and
:py:func:`~pvlib.pvsystem.calcparams_desoto`. (:issue:`698`)
Expand Down
6 changes: 5 additions & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,

[4] Duffie, J. A. and Beckman, W. A. 1991. Solar Engineering of
Thermal Processes, 2nd edn. J. Wiley and Sons, New York.

[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.
"""

to_doy, to_datetimeindex, to_output = \
Expand All @@ -88,7 +92,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,
# consider putting asce and spencer methods in their own functions
method = method.lower()
if method == 'asce':
B = solarposition._calculate_simple_day_angle(to_doy(datetime_or_doy))
B = (2. * np.pi / 365.) * (to_doy(datetime_or_doy))
RoverR0sqrd = 1 + 0.033 * np.cos(B)
elif method == 'spencer':
B = solarposition._calculate_simple_day_angle(to_doy(datetime_or_doy))
Expand Down