Tools

SPA

sundialy.tools.SPA(year: int, month: int, day: int | float, hour: int | float, minute: int | float, second: int | float, microsecond: int | float, latitude: int | float, longitude: int | float, elevation: int | float, pressure: int | float, temperature: int | float, omega: int | float, gamma: int | float, dt: int | float = 69.3) Tuple[Tuple[float, float, float, float, float, float, float], Tuple[float, float, float, float, str], Tuple[int, int, float]]

SPA (Solar Position Algorithm).

This algorithm calculates the solar zenith and azimuth angles in the period from the year -2000 to 6000, with uncertainties of +/- 0.0003 degrees based on the date, time, and location on Earth.

Parameters:
  • year – Year

  • month – Month

  • day – Day

  • hour – Hour

  • minute – Minute

  • second – Second

  • microsecond – Microsecond

  • latitude – Latitude

  • longitude – Longitude

  • elevation – Observer elevation (in meters)

  • pressure – Annual average local pressure (in millibars)

  • temperature – Annual average local temperature (in Celsius)

  • omega – The slope of the surface measured from the horizontal plane

  • gamma – The surface azimuth rotation angle

  • dt – The difference between the Earth rotation time and the Terrestrial Time (TT)

Returns:

((incidence angle, topocentric zenith angle, topocentric azimuth angle, topocentric sun declination, topocentric local hour angle, topocentric sun right ascension, e topocentric elevation angle), (Equation of Time, sun transit, sunrise, sunset, note), (year, month, day))

SAMPA

sundialy.tools.SAMPA(year: int, month: int, day: int | float, hour: int | float, minute: int | float, second: int | float, microsecond: int | float, latitude: int | float, longitude: int | float, elevation: int | float, pressure: int | float, temperature: int | float, ozone: int | float = 0.3, water: int | float = 1.5, aerosol: int | float = 0.04, albedo: int | float = 0.2, ba: int | float = 0.85, k1: int | float = 0.1, dt: int | float = 69.3) Tuple[Tuple[float, float, float, float, float, float, float, float], Tuple[float, float, int | float, float, Tuple[int | float, int | float, int | float, int | float, int | float, int | float], str]]

SAMPA (Solar and Moon Position Algorithm).

This algorithm calculates the solar and lunar zenith and azimuth angles in the period from the year -2000 to 6000, with uncertainties of +/- 0.0003 degrees for the Sun and +/- 0.003 degrees for the Moon, based on the date, time, and location on Earth. The algorithm can be used for solar eclipse monitoring and estimating the reduction in solar irradiance for many applications, such as smart grid, solar energy, etc.

Parameters:
  • year – Year

  • month – Month

  • day – Day

  • hour – Hour

  • minute – Minute

  • second – Second

  • microsecond – Microsecond

  • latitude – Latitude

  • longitude – Longitude

  • elevation – Observer elevation (in meters)

  • pressure – Annual average local pressure (in millibars)

  • temperature – Annual average local temperature (in Celsius)

  • ozone – Amount of ozone in a vertical column from surface (cm)

  • water – Amount of precipitable water in a vertical column from surface (cm)

  • aerosol – Broadband aerosol optical depth from surface in a vertical path (broadband turbidity)

  • albedo – Ground albedo

  • ba – Ratio of the forward-scattered irradiance to the total scattered irradiance due to aerosols

  • k1 – Constant used in Bird model associated with aerosol absorptance

  • dt – The difference between the Earth rotation time and the Terrestrial Time (TT)

Returns:

((sun’s topocentric zenith angle, sun’s topocentric azimuth angle, moon’s topocentric zenith angle, moon’s topocentric azimuth angle, topocentric moon’s declination, topocentric moon’s local hour angle, moon’s topocentric right ascension, true obliquity of the ecliptic), (radius of the sun’s disk, radius of the moon’s disk, area of SUL, percentage area of the SUL with respect to the area of the sun’s disk, (Estimated direct normal irradiance [W/m^2], Estimated direct normal irradiance from sun’s unshaded lune [W/m^2], Estimated global horiz irradiance [W/m^2], Estimated global horiz irradiance from sun’s unshaded lune [W/m^2], Estimated diffuse horiz irradiance [W/m^2], Estimated duffuse horiz irradiance from sun’s unshaded lune [W/m^2]), solar eclipse notes))

SOLPOS

sundialy.tools.SOLPOS(year: int, month: int, day: int, hour: int | float, minute: int | float, second: int | float, timezone: int | float, latitude: int | float, longitude: int | float, pressure: int | float, temperature: int | float, aspect: int | float = 180, tilt: int | float = 0, sb_width: int | float = 7.6, sb_radius: int | float = 31.7, sb_sky: int | float = 0.04, interval: int | float = 0) Tuple[float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float]

SOLPOS (Solar Position and Intensity).

Parameters:
  • year – Year

  • month – Month

  • day – Day

  • hour – Hour

  • minute – Minute

  • second – Second

  • timezone – Timezone

  • latitude – Latitude

  • longitude – Longitude

  • pressure – Pressure (in millibars)

  • temperature – Temperature (in Celsius)

  • aspect – Where the surface faces. Default: 180 (south)

  • tilt – The tilt of the surface. Default: 0 (horizontal)

  • sb_width – Eppley shadow band width

  • sb_radius – Eppley shadow band radius

  • sb_sky – Drummond factor for partly cloudy skies

  • interval – Instantaneous measurement interval

Returns:

(airmass, pressure corrected airmass, zenith (refracted), azimuth angle, elevation (ETR), refracted solar elevation angle, ETR global, ETR direct, ETR tilt, sunrise time, sunset time, shadowband correction factor, prime, unprime, day angle, declination, equation of time, right ascension)

Bird

sundialy.tools.Bird(r: int | float, zenith: int | float, pressure: int | float, ozone: int | float, water: int | float, aerosol: int | float, albedo: int | float, dni_mod: int | float, ba: int | float = 0.85, k1: int | float = 0.1) Tuple[int | float, int | float, int | float, int | float, int | float, int | float, int | float]

Bird (Bird Clear Sky Model).

The Bird Clear Sky Model, authored by Richard Bird, is a broadband algorithm that produces estimates of clear sky direct beam, hemispherical diffuse, and total hemispherical solar radiation on a horizontal surface.

Parameters:
  • r – The Sun’s distance from the center of the Earth in astronomical units

  • zenith – The zenith

  • pressure – The pressure

  • ozone – Amount of ozone in a vertical column from surface (cm)

  • water – Amount of precipitable water in a vertical column from surface (cm)

  • aerosol – Broadband aerosol optical depth from surface in a vertical path (broadband turbidity)

  • albedo – Ground albedo

  • dni_mod – Area of the SUL With Respect to the Area of the Sun’s Disk

  • ba – Ratio of the forward-scattered irradiance to the total scattered irradiance due to aerosols

  • k1 – Constant used in Bird model associated with aerosol absorptance

Returns:

(Relative optical airmass (not pressure corrected), Estimated direct normal irradiance [W/m^2], Estimated global horiz irradiance [W/m^2], Estimated diffuse horiz irradiance [W/m^2], Estimated direct normal irradiance from sun’s unshaded lune [W/m^2], Estimated global horiz irradiance from sun’s unshaded lune [W/m^2], Estimated duffuse horiz irradiance from sun’s unshaded lune [W/m^2])