solposx.solarposition.psa

Contents

solposx.solarposition.psa#

solposx.solarposition.psa(times, latitude, longitude, *, coefficients=2020)#

Calculate solar position using the PSA algorithm.

The algorithm was developed at Plataforma Solar de Almería (PSA) [1] (2001) and [2] (2020).

This algorithm can use two sets of coefficients:

  • 2001 - tuned to the range 1999-2015

  • 2020 - tuned to the range 2020-2050

Parameters:
  • times (pandas.DatetimeIndex) – Timestamps - must be localized. Prior to 1970 and far in the future UTC and UT1 may deviate significantly. For such use cases, UT1 times should be provided.

  • latitude (float) – Latitude in decimal degrees. Positive north of equator, negative to south. [degrees]

  • longitude (float) – Longitude in decimal degrees. Positive east of prime meridian, negative to west. [degrees]

  • coefficients (int or list, default 2020) – Coefficients for the solar position algorithm. Available options include 2001 or 2020. Alternatively a list of custom coefficients can be specified.

Raises:

ValueError – Raises an error if coefficients is not in [2001, 2020] or a list of the 15 coefficients.

Returns:

DataFrame with the following columns (all values in degrees):

  • elevation : actual sun elevation (not accounting for refraction).

  • azimuth : sun azimuth, east of north.

  • zenith : actual sun zenith (not accounting for refraction).

Return type:

pandas.DataFrame

References