calc_solar_time: Calculate solar.time from local.time

View source: R/calc_solar_time.R

calc_solar_timeR Documentation

Calculate solar.time from local.time

Description

Calculate the appropriate solar.time column for input to metab(). The input must be POSIXct clock time and should have the correct timezone information embedded in the object, whether the tz is UTC, local time with daylight savings, or local standard time. The output is always mean solar time (not apparent; see convert_UTC_to_solaritme).

Usage

calc_solar_time(local.time, longitude)

Arguments

local.time

POSIXct date+time of interest, already in local time as specified by the tz attribute

longitude

numeric, in degrees, either positive and unitted ("degE" or "degW") or with sign indicating direction (positive = East)

Examples

local.time <- as.POSIXct('2016-05-27 12:00:00', tz='America/New_York')
solar.time <- calc_solar_time(local.time, longitude=-74)

USGS-R/streamMetabolizer documentation built on Aug. 15, 2023, 7:50 a.m.