pvlib.spa.transit_sunrise_sunset#
- pvlib.spa.transit_sunrise_sunset(dates, lat, lon, delta_t, numthreads)[source]#
Calculate the sun transit, sunrise, and sunset for a set of dates at a given location using the NREL SPA.
The NREL SPA is documented in [1], [2].
- Parameters:
dates (array) – Numpy array of ints/floats corresponding to the Unix time for the dates of interest, must be midnight UTC (00:00+00:00) on the day of interest.
lat (float) – Latitude of location to perform calculation for
lon (float) – Longitude of location
delta_t (float or array) – Difference between terrestrial time and UT. USNO has tables.
numthreads (int) – Number to threads to use for calculation (if using numba)
- Returns:
tuple ((transit, sunrise, sunset) localized to UTC)
References