daylength: photoperiod

photoperiodR Documentation

photoperiod

Description

Compute photoperiod (daylength, sunshine duration) at a given latitude and day of the year.

Usage

## S4 method for signature 'Date'
photoperiod(x, latitude)

## S4 method for signature 'data.frame'
photoperiod(x)

## S4 method for signature 'SpatRaster'
photoperiod(x, filename="", overwrite=FALSE, ...)

Arguments

x

Date, integer (day of the year), or data.frame (with variables "date" and "latitude", or SpatRaster

latitude

numeric. Latitude

filename

character. Output filename

overwrite

logical. If TRUE, filename is overwritten

...

additional arguments for writing files as in writeRaster

Value

double. Photoperiod in hours

References

Forsythe, W.C., E.J. Rykiel Jr., R.S. Stahl, H. Wu, R.M. Schoolfield, 1995. A model comparison for photoperiod as a function of latitude and day of the year. Ecological Modeling 80: 87-95.

Examples

photoperiod(50, 52)
photoperiod(50, 5)
photoperiod(180, 55)

p <- photoperiod(1:365, 52)
d <- dateFromDoy(1:365, 2001)
plot(d, p)

meteor documentation built on July 26, 2023, 5:16 p.m.