calc_light: Calculate modeled light from solar.time

View source: R/calc_light.R

calc_lightR Documentation

Calculate modeled light from solar.time

Description

Calculate photosynthetically active radiation (PAR) for a series of date-times and site coordinates.

Usage

calc_light(
  solar.time,
  latitude,
  longitude,
  max.PAR = u(2326, "umol m^-2 s^-1"),
  attach.units = deprecated()
)

Arguments

solar.time

mean solar time, as required for input to metabolism models. See mm_data and calc_solar_time.

latitude

numeric value or vector indicating the site latitude in decimal degrees (never radians or deg-min-sec, no matter what format is) between -90 (South Pole) and 90 (North Pole).

longitude

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

max.PAR

numeric or unitted_numeric: the PAR (umol m^-2 s^-1) that each day should reach at peak light

attach.units

(deprecated, effectively FALSE in future) logical. Should the returned vector be a unitted object?

Examples

solar.time <- lubridate::force_tz(as.POSIXct('2016-09-27 12:00'), 'UTC')
calc_light(solar.time, 40, -120)
library(unitted)
calc_light(u(solar.time), u(40, 'degN'), u(-120, 'degE'), u(2315, 'umol m^-2 s^-1'))

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