View source: R/potential_radiation.r
potential.radiation | R Documentation |
Compute potential radiation for given geolocation and day of year.
potential.radiation(doy, hour, latDeg, longDeg, timezone, useSolartime = TRUE)
doy |
Integer vector with day of year (start at 1), same length as |
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 |
vector of potential radiation (W m-2)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.