Learn R Programming

bigleaf (version 0.8.2)

potential.radiation: Potential radiation

Description

Compute potential radiation for given geolocation and day of year.

Usage

potential.radiation(doy, hour, latDeg, longDeg, timezone, useSolartime = TRUE)

Value

vector of potential radiation (W m-2)

Arguments

doy

Integer vector with day of year (start at 1), same length as hour or length 1.

hour

Numeric vector with daytime as decimal hour of local time zone

latDeg

Latitude (decimal degrees)

longDeg

Longitude (decimal degrees)

timezone

Time zone (hours)

useSolartime

by default corrects hour (given in local winter time) for latitude to solar time (where noon is exactly at 12:00). Set this to FALSE to directly use local winter time.

Examples

Run this code
hour <- seq(5, 18, by = 0.1)
potRadApparentLocal <- potential.radiation(
  160, hour, 39.94, -5.77, timezone = +1)
potRadTimezone <- potential.radiation(
  160, hour, 39.94, -5.77, timezone = +1, useSolartime = FALSE)
plot(potRadApparentLocal ~ hour, type = 'l'
  , ylab = 'potential radiation (W m-2)')
lines(potRadTimezone ~  hour, col = "blue")
abline(v = 12, col = "blue", lty = "dotted")
legend("bottomright", legend = c("solar time", "local winter time")
, col = c("black", "blue"), inset = 0.05, lty = 1)

Run the code above in your browser using DataLab