calc_cc | R Documentation |
Calculate cloud cover using latitude, air temperature, relative humidity (or dewpoint temperature) and short wave radiation using the calculations from Martin and McCutcheon (1999).
calc_cc(date, airt, relh = NULL, dewt = NULL, swr, lat, lon, elev, daily = F)
date |
vector; Dates in as.POSixct class |
airt |
vector; Air temperature values which correspond to the vector of dates |
relh |
vector; Relative humidity values which correspond to the vector of dates |
dewt |
vector; Dewpoint temperature values which correspond to the vector of dates. Used instead of relative humidity |
swr |
vector; Short-wave radiation values which correspond to the vector of dates |
lat |
numeric; Latitude position (in decimal) |
lon |
numeric; Longitude position (in decimal) |
elev |
numeric; elevation in metres above sea level |
daily |
deprecated; logical; Is the data on a daily timestep. Defaults to FALSE |
vector of cloud cover values which correspond to the vector of dates supplied
met_file <- system.file('extdata/met_file.dat', package = 'GOTMr')
swr_file <- system.file('extdata/swr_input_file.dat', package = 'GOTMr')
met <- read.delim(met_file)
met[,1] <- as.POSIXct(met[,1], tz = 'UTC')
swr <- read.delim(swr_file)
swr[,1] <- as.POSIXct(swr[,1], tz = 'UTC')
met <- merge(met, swr, by = 1)
cc <- calc_cc(date = met[,1], airt = met$AirT, dewt = met$DewT, swr = met$SWR, lat = 53, lon = -9.5, elev = 14, daily = F)
plot(cc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.