pvlib.solarposition.spa_c

pvlib.solarposition.spa_c(time, latitude, longitude, pressure=101325, altitude=0, temperature=12, delta_t=67.0, raw_spa_output=False)[source]

Calculate the solar position using the C implementation of the NREL SPA code

The source files for this code are located in ‘./spa_c_files/’, along with a README file which describes how the C code is wrapped in Python. Due to license restrictions, the C code must be downloaded seperately and used in accordance with it’s license.

Parameters:

time : pandas.DatetimeIndex

Localized or UTC.

latitude : float

longitude : float

pressure : float

Pressure in Pascals

altitude : float

Elevation above sea level.

temperature : float

Temperature in C

delta_t : float

Difference between terrestrial time and UT1. USNO has previous values and predictions.

raw_spa_output : bool

If true, returns the raw SPA output.

Returns:

DataFrame

The DataFrame will have the following columns: elevation, azimuth, zenith, apparent_elevation, apparent_zenith.

References

NREL SPA code: http://rredc.nrel.gov/solar/codesandalgorithms/spa/

USNO delta T: http://www.usno.navy.mil/USNO/earth-orientation/eo-products/long-term