daylength: Calculate daylength values

View source: R/helper_functions.R

daylengthR Documentation

Calculate daylength values

Description

Calculates day length (in hours) and the solar elevation above the ecliptic plane based upon latitude and a day of year, and year values. according to H.Glarner (http://herbert.gandraxa.com/length_of_day.xml)

Usage

daylength(doy, latitude)

Arguments

doy

a vector with doy values 1 - 365(6)

latitude

a given latitude

Details

Due to heterogeneous date formats with years normalized to 365 days I do not apply a leap year correction.

Value

a daylength vector

Examples


## Not run: 
# calcualte the hours of sunlight and solar elevation on day of year 1
length_of_day = daylength(1, 51, 2000)
print(length_of_day)

## End(Not run)

khufkens/phenor documentation built on June 28, 2024, 2:30 p.m.