The function calculates daylength in hours as a function of latitude and day of year. Uses the CMB model (Campbell and Norman 1998) .

daylength(lat, doy)

Arguments

lat

numeric latitude (decimal degrees).

doy

numeric day of year (1-366). This can be obtained from standard date via day_of_year.

Value

numeric day length (hours).

References

Campbell GS, Norman JM (1998). Introduction to environmental biophysics, 2nd ed. edition. Springer, New York. ISBN 0387949372.

Examples

  daylength(lat = 47.61, 
            doy = 112)
#> [1] 15.06007