solartime: Obtain local solar time from clock time

Description Usage Arguments Value Author(s) Examples

View source: R/solartime.R

Description

Calculates solar time at a given location, given the clock time

Usage

1
solartime(localtime, lat, lon, merid = 0, dst = 0, day)

Arguments

localtime

Local clock time, in hours from midnight

lat

Latitude, in degrees

lon

Longitude, in degrees

merid

Longitude of local standard time meridian, in degrees east from Greenwich. The default (0) corresponds to the Greenwich mean time meridian; for Central European time (most of Western Europe except UK, Eire and Portugal), use merid = 15.

dst

Local adjustment for summertime. For countries which advance their clocks in spring, this is 1 during the summer and 0 in winter.

day

Day of the year (1 to 365)

Value

Vector of local solar time, in hours from midnight.

Author(s)

Jon Bennie

Examples

1
2
3
day <- c(1:365)
soltime <- solartime(localtime=12, lat=52, lon=1, merid=0, dst=0, day=day)
plot(soltime ~ day, type="l") 	# Plot the equation of time

rforge/microclim documentation built on Feb. 21, 2022, 7:49 a.m.