Learn R Programming

solartime (version 0.0.4)

computeDayLengthDoy: computeDayLengthDoy

Description

Compute the Day-length in hours for given time and coordinates

Usage

computeDayLengthDoy(doy, latDeg)

Value

numeric vector of length(doy) giving the time between sunrise and sunset in hours

Arguments

doy

integer vector with day of year [DoY, 1..366], same length as Hour or length 1

latDeg

Latitude in (decimal) degrees

Author

Thomas Wutzler

Examples

Run this code
doy <- 1:366
plot( computeDayLengthDoy(doy, latDeg = 51) ~ doy)
# north pole: daylength 0 and 24 hours
plot( computeDayLengthDoy( doy, latDeg = +80) ~ doy )
plot( computeDayLengthDoy( doy, latDeg = -80) ~ doy )

Run the code above in your browser using DataLab