calc_swr: Calculate SWR using calculation within GOTM

Description Usage Arguments Value

View source: R/calc_swr.R

Description

Calculates incoming SWR using cloud cover, time, latitude and longitude. Calculations taken from the GOTM code. See https://github.com/gotm-model/code Note: For GOTM all inputs have to be in UTC so be sure to switch back to local timezone if working with subdaily data.

Usage

1
calc_swr(time, lat, lon, cloud, daily2hour = F)

Arguments

time

vector; In POSIXct format

lat

numeric; Latitude in decimal degrees

lon

numeric; Longitude in decimal degrees

cloud

vector; Cloud cover values [0-1] which correspond to the times supplied

daily2hour

logical; Indicate whether you are converting daily cloud cover data to hourly SWR or hourly cloud cover. Default = FALSE

Value

If daily2hour = FALSE, then a vector of SWR values are returned corresponding to input time vector. If TRUE, a data.frame with the DateTime and SWR are returned.


tadhg-moore/gotmtools documentation built on Oct. 9, 2019, 2:48 p.m.