solposx.refraction.spa

Contents

solposx.refraction.spa#

solposx.refraction.spa(elevation, pressure=101325.0, temperature=12.0, *, refraction_limit=-0.5667)#

Atmospheric refraction correction from the SPA algorithm.

This function calculates the atmospheric refraction correction of the solar elevation angle using the method described in Reda and Andreas’s [1] Solar Position Algorithm (SPA).

Parameters:
  • elevation (array-like) – True solar elevation angle (not accounting for refraction). [degrees]

  • pressure (numeric, default 101325) – Annual average local pressure. [Pa]

  • temperature (numeric, default 12) – Annual average local air temperature. [C]

  • refraction_limit (float, default -0.5667) – Solar elevation angle below which refraction is not applied, as the sun is assumed to be below horizon. Note that the sun diameter is added to this. [degrees]

Returns:

Atmospheric refraction angle. [degrees]

Return type:

np.array or pd.Series

Notes

The equation to calculate the refraction correction is given by:

\[ref = \frac{P}{101000} \cdot \frac{283}{273 + T} \cdot \frac{1.02}{60 \cdot \text{tan} (el + 10.3/(el + 5.11))}\]

where \(el\) is the true solar elevation angle, \(P\) is the annual average local air pressure, and \(T\) is the annual average local air temperature.

References