Global radiation
Bigleaf.calc_sun_position_MOD
Bigleaf.calc_sun_position_hor
Bigleaf.extraterrestrial_radiation
Bigleaf.potential_radiation
Bigleaf.potential_radiation
— Functionpotential_radiation(datetime, lat, long)
potential_radiation(doy, hour, lat, long; timezone,year)
Compute potential radiation for given geolocation and time.
Because potential radiation does not change across years (for a given location and daytime and day of year), time can be specified alternatively by doy and hour.
Arguments
- datetime: UTC timestamp.
- lat: Latitude (decimal degrees)
- long: Longitude (decimal degrees)
- doy: day of year (integer starting from 1)
- hour: hour within the day (0.0 .. 24.0 float)
optional
- timezone: Timezone for doy and hour, defaults to "GMT+x" nearest to given longitude.
- year: specific year for doy and hour
Value
vector of potential radiation (W m-2)
Examples
# assume hours in the GMT+x that is closest to given longitude
potrad = potential_radiation(160, 10.5, 51.0, 11.5)
potential_radiation(datetime, lat, long)
potential_radiation(doy, hour, lat, long; timezone,year)
Compute potential radiation for given geolocation and time.
Because potential radiation does not change across years (for a given location and daytime and day of year), time can be specified alternatively by doy and hour.
Arguments
- datetime: UTC timestamp.
- lat: Latitude (decimal degrees)
- long: Longitude (decimal degrees)
- doy: day of year (integer starting from 1)
- hour: hour within the day (0.0 .. 24.0 float)
optional
- timezone: Timezone for doy and hour, defaults to "GMT+x" nearest to given longitude.
- year: specific year for doy and hour
Value
vector of potential radiation (W m-2)
Examples
# assume hours in the GMT+x that is closest to given longitude
potrad = potential_radiation(160, 10.5, 51.0, 11.5)
Bigleaf.extraterrestrial_radiation
— Functionextraterrestrial_radiation(doy::Number; ...)
extraterrestrial_radiation(datetime::TimeType; ...)
Compute the extraterrestrial solar radiation with the eccentricity correction. Computation follows Lanini, 2010 (Master thesis, Bern University).
Arguments
- doy: integer vector with day of year (DoY)
optional
constants=
bigleaf_constants
()
: Dictionary with entries- solar_constant
year
=2030: year to create timestamps. Due to precession results slightly change across decades.
Value
numeric vector of extraterrestrial radiation (W_m-2)
Examples
ex_rad = extraterrestrial_radiation(1)
≈(ex_rad, 1414, atol = 1)
extraterrestrial_radiation(doy::Number; ...)
extraterrestrial_radiation(datetime::TimeType; ...)
Compute the extraterrestrial solar radiation with the eccentricity correction. Computation follows Lanini, 2010 (Master thesis, Bern University).
Arguments
- doy: integer vector with day of year (DoY)
optional
constants=
bigleaf_constants
()
: Dictionary with entries- solar_constant
year
=2030: year to create timestamps. Due to precession results slightly change across decades.
Value
numeric vector of extraterrestrial radiation (W_m-2)
Examples
ex_rad = extraterrestrial_radiation(1)
≈(ex_rad, 1414, atol = 1)
Bigleaf.calc_sun_position_hor
— Functioncalc_sun_position_hor(datetime, lat, long)
Compute the Sun position at given time and observer coordinates in horizontal coordinates.
Arguments:
datetime
: time: Either aZonedDateTime
, orDateTime
assumed in UTClat
,long
: latitude and longitude in degree
Value
NamedTuple
: sun position with entries
altitude
: angle above the horizon [rad].azimuth
: angle ange the horizon plane eastwards of north [rad]hourangle
: [rad] as output by AstroLib.eq2hor Seems to represent time [day/2pi] after solar noon. Value at local timezone noon provdes (local time - solar time).
calc_sun_position_hor(datetime, lat, long)
Compute the Sun position at given time and observer coordinates in horizontal coordinates.
Arguments:
datetime
: time: Either aZonedDateTime
, orDateTime
assumed in UTClat
,long
: latitude and longitude in degree
Value
NamedTuple
: sun position with entries
altitude
: angle above the horizon [rad].azimuth
: angle ange the horizon plane eastwards of north [rad]hourangle
: [rad] as output by AstroLib.eq2hor Seems to represent time [day/2pi] after solar noon. Value at local timezone noon provdes (local time - solar time).
Bigleaf.calc_sun_position_MOD
— Functioncalc_sun_position_MOD(JD::Number)
Compute the Sun position at the Julian Day JD
.
Results are represented in the Mean Equinox of Date (MOD), i.e. accounting for precession but not for nutation and smaller pertubation of the polar axes, in spherical ecliptic and equatorial coordinates. The algorithm was adapted from [Vallado 2013, p. 277-279].
Arguments:
JD
: time given as Julian Day .
Value
NamedTuple
: sun position where
- Ecliptic coordinates (1:3)
- λ: Ecliptic longitude of the Sun [rad].
- β: Ecliptic latitude of the Sun [rad] is assumed 0.
- r: Distance of the Sun from Earth [m].
- Equatorial coordinate (4:5)
- α: ascention [rad]
- δ: declination [rad]
- ϵ: Obliquity of the ecliptic [rad].
References
- Vallado, D. A (2013). Fundamentals of Astrodynamics and Applications. Microcosm Press, Hawthorne, CA.