Skip to contents

Estimate of down-welling solar (short wave) irradiance at the top of the atmosphere above a location on Earth, computed based on angles, Sun-Earth distance and the solar constant. Astronomical computations are done with function sun_angles().

Usage

irrad_extraterrestrial(
  time = lubridate::now(tzone = "UTC"),
  tz = lubridate::tz(time),
  geocode = tibble::tibble(lon = 0, lat = 51.5, address = "Greenwich"),
  solar.constant = "NASA"
)

Arguments

time

A "vector" of POSIXct Time, with any valid time zone (TZ) is allowed, default is current time.

tz

character string indicating time zone to be used in output.

geocode

data frame with variables lon and lat as numeric values (degrees), nrow > 1, allowed.

solar.constant

numeric or character If character, "WMO" or "NASA", if numeric, an irradiance value in the same units as the value to be returned.

Value

Numeric vector of extraterrestrial irradiance (in W / m2 if solar constant is a character value).

See also

Function sun_angles.

Examples

library(lubridate)

irrad_extraterrestrial(ymd_hm("2021-06-21 12:00", tz = "UTC"))
#> [1] 1161.983

irrad_extraterrestrial(ymd_hm("2021-12-21 20:00", tz = "UTC"))
#> [1] 0

irrad_extraterrestrial(ymd_hm("2021-06-21 00:00", tz = "UTC") + hours(1:23))
#>  [1]    0.00000    0.00000    0.00000   28.78267  209.56415  403.99302
#>  [7]  598.82306  780.78084  937.47001 1058.21579 1134.79222 1161.98253
#> [13] 1137.93449 1064.28664  946.05654  791.29897  610.55716  416.14444
#> [19]  221.30541   39.31359    0.00000    0.00000    0.00000