daylength {springpheno} | R Documentation |
Daylength Calculator
Description
The function daylength will calculate the day length for a given for all days of the year up to the user defined day of the year and latitude of the location. Essentially this is the number of hours of daylight for given location for each day. The formula for day length calculation is retained from Ault et al. (2015).
Usage
daylength(daystop, lat)
Arguments
daystop |
Scalar - Calendar day of year from 1 to 366 where the function should cease day length calculations |
lat |
Scalar - latitude of the locations, in decimal degrees |
Value
DAYLEN - vector of length equal to input daystop describing the total hours of daylight per day.
Author(s)
Adrienne M. Wootten (University of Oklahoma)
References
Ault, T.R., R. Zurita-Miller and M. Schwarz, 2015: A MatlabĀ© toolbox for calculating spring indices from daily meteorological data. Computers and Geosciences, 83, DOI: 10.1016/j.cageo.2015.06.015
Examples
daystop <- 366
lat <- 35.476 # latitude for OKC
result <- daylength(daystop=daystop,lat=lat)