gseason_day: gseason_day: Determine daytime hours

Description Usage Arguments Value See Also Examples

Description

gseason_day is used to calculate daytime (1) and non-daytime (0) hours.

Usage

1
gseason_day(tme, lat, long, merid = 0, dst = 0)

Arguments

tme

a POSIXlt object.

lat

latitude of the location for which gseason_day is required.

long

longitude of the location for which gseason_day is required.

merid

an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT). Default is 0.

dst

an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if merid = 0). Default is 0.

Value

a vector of binary values indicating day (1) or night (0).

See Also

the tmecreate() function can be used to create a POSIXlt object.

Requires wrapper function sisimple to be loaded.

Examples

1
2
3
Daytime hours in Porthleven, Cornwall for 2010.
tme <- tmecreate(2010, 1)
gseason_day(tme, 50.08, -5.31)

ilyamaclean/climvars documentation built on June 19, 2019, 2:22 p.m.