bio19: bio19: Precipitation of the coldest quarter

Description Usage Arguments Details Value See Also Examples

Description

bio19 is used to calculate the precipitation in the coldest quarter of the year.

Usage

1
bio19(temps, prec, tme1, tme2, method = "")

Arguments

temps

a vector of temperature values, normally for one year (see details)

prec

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

tme1

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

tme2

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

method

an optional character string describing how quarterly mean temperature and precipitation are calculated. Options are "anuclim" or unspecified (see details).

Details

If method is "anuclim", monthly mean temeprature and total monthly precipitation are interpolated to weekly time period before calculating mean temperature for each 13-week period. The precipitation in the coldest quarter is then calculated. If data spans more than one year, data are aggregated by unique month irrespective of year and one value returned If method is left unspecified, the mean temperature in each three-month period is calculated and precipitation in the coldest quarter returned. If data spans more than one year, calculations are performed on all data and single value returned.

Value

a single numeric value of precipitation in the coldest quarter of the year.

See Also

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

Examples

1
2
3
4
5
6
7
prec <- 10 * sin(c(0:364) * (pi / -360)) + (rnorm(365) + 12)
temps <- 10 * sin(c(0:1459) / (pi * 150)) + rnorm(1460)
tme1 <- tmecreate(2010, 6)
tme2<- tmecreate(2010, 24)
plot(prec~as.POSIXct(tme), type = "l", xlab = "Month", ylab = "Precipitation")
bio19(temps, prec, tme1, tme2)
bio19(temps, prec, tme1, tme2, method="anuclim")

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