diff --git a/docs/sphinx/source/reference/solarposition.rst b/docs/sphinx/source/reference/solarposition.rst index dbe93d5392..42d02c5de1 100644 --- a/docs/sphinx/source/reference/solarposition.rst +++ b/docs/sphinx/source/reference/solarposition.rst @@ -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 diff --git a/docs/sphinx/source/whatsnew/v0.16.2.rst b/docs/sphinx/source/whatsnew/v0.16.2.rst index f704525a12..6cc4056a0a 100644 --- a/docs/sphinx/source/whatsnew/v0.16.2.rst +++ b/docs/sphinx/source/whatsnew/v0.16.2.rst @@ -22,6 +22,8 @@ Enhancements Documentation ~~~~~~~~~~~~~ +* Add :py:func:`pvlib.spa.transit_sunrise_sunset` to the API reference. + (:issue:`2255`, :pull:`2873`) Testing diff --git a/pvlib/spa.py b/pvlib/spa.py index fe072b2cc9..18c7843f45 100644 --- a/pvlib/spa.py +++ b/pvlib/spa.py @@ -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]_. Parameters ---------- @@ -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` """ if ((dates % 86400) != 0.0).any():