bio17: bio17: Calculates precipitation of the driest quarter

Description Usage Arguments Details Value See Also Examples

Description

bio17 is used to calculate the precipitation in the driest quarter of the year

Usage

1
bio17(prec, tme, method = "")

Arguments

prec

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

tme

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

method

an optional character string describing how quarterly precipitation is calculated. Options include "anuclim" or unspecified (see details).

Details

If method is "anuclim", monthly precipitation is spline interpolated to a weekly time period and precipitation of each 13-week period is calculated. The precipitation in the driest quarter is then found. If data spans more than one year, data are aggregated by unique month irrespective of year and one value returned. Otherwise, precipitation in each three-month period is calculated and total precipitation in the driest quarter returned. If data span more than one year, calculations are performed on all data and single value returned.

Value

a single numeric value of precipitation of the driest quarter.

See Also

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

Examples

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

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