Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/sphinx/source/reference/solarposition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Functions for calculating sunrise, sunset and transit times.
solarposition.sun_rise_set_transit_ephem
solarposition.sun_rise_set_transit_spa
solarposition.sun_rise_set_transit_geometric
spa.transit_sunrise_sunset


The spa module contains the implementation of the built-in NREL SPA
Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.16.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Enhancements

Documentation
~~~~~~~~~~~~~
* Add :py:func:`pvlib.spa.transit_sunrise_sunset` to the API reference.
(:issue:`2255`, :pull:`2873`)


Testing
Expand Down
7 changes: 6 additions & 1 deletion pvlib/spa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ def solar_position(unixtime, lat, lon, elev, pressure, temp, delta_t,
def transit_sunrise_sunset(dates, lat, lon, delta_t, numthreads):
"""
Calculate the sun transit, sunrise, and sunset
for a set of dates at a given location.
for a set of dates at a given location using the NREL SPA [1]_.

@RDaxini RDaxini Oct 5, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion contingent on #2873 (comment)

Suggested change
for a set of dates at a given location using the NREL SPA [1]_.
for a set of dates at a given location using the NREL SPA [1]_, [2]_.


Parameters
----------
Expand All @@ -1129,6 +1129,11 @@ def transit_sunrise_sunset(dates, lat, lon, delta_t, numthreads):
-------
tuple : (transit, sunrise, sunset) localized to UTC

References
----------
.. [1] I. Reda and A. Andreas, Solar position algorithm for solar
radiation applications. Solar Energy, vol. 76, no. 5, pp. 577-589,
2004. :doi:`10.1016/j.solener.2003.12.003`
"""

@RDaxini RDaxini Oct 5, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we cite the corrigendum as well? Open question from me, not a direct suggestion. My first thought is that it might be helpful to users for completeness at no cost.
Note: we do cite both in spa.solar_position

Suggested change
"""
References
----------
.. [1] I. Reda and A. Andreas, Solar position algorithm for solar
radiation applications. Solar Energy, vol. 76, no. 5, pp. 577-589,
2004. :doi:`10.1016/j.solener.2003.12.003`
.. [2] I. Reda, and A. Andreas. "Corrigendum to “Solar position
algorithm for solar radiation applications." [Solar Energy 76
(2004) 577–589] Solar Energy, vol. 81, no. 6, pp. 838, 2007.
:doi:`10.1016/j.solener.2007.01.003`
"""


if ((dates % 86400) != 0.0).any():
Expand Down
Loading