bio4: bio4: Calculates temperature seasonality

Description Usage Arguments Details Value See Also Examples

Description

bio4 calculates the variation in temperature over a given year as the coeeficient of variation in the mean temperatures

Usage

1
bio4(temps, tme, method = "")

Arguments

temps

a vector of temperatures, normally for one year (see details).

tme

a POSIXlt object representing the date and time of each temps value.

method

an optional character string describing the method used to calculate temperature seasonality. Options are "anuclim" or unspecified (see details).

Details

If method is "anuclim" temperatures are aggregated by month and monthly averages are calculated and spline intepolated to weekly values. Temperature seasonality is calculated as the standard deviation of weekly mean temperatures as a percentage of the mean of those temperatures. If using "anuclim" method and data span more than one year, data are aggregated by unique month irrespective of year and one value returned. If method is not specified, calculation is based on the standard deviation of the mean of all temperatures as a percentage of the mean of all temperatures. If method is not specified and data span more than one year, calculations will be performed on all data and a single value returned. For all calculations, the mean in degrees Kelvin is used.

Value

a single numeric value representng annual temperature seasonality.

See Also

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

Examples

1
2
3
4
5
temps <- 10 * sin(c(0:1459) / (pi * 150)) + rnorm(1460)
tme <- tmecreate(2010, 6)
plot(temps~as.POSIXct(tme), type = "l", xlab = "Month", ylab = "Temperature")
bio4(temps, tme)
bio4(temps, tme, method = "anuclim")

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