bio14: bio14: Calculates precipitation of the driest period

Description Usage Arguments Details Value See Also Examples

Description

bio14 is used to calculate the precipitation in the driest period of the year

Usage

1
bio14(prec, tme, method = "week")

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 the minimum weekly or monthly precipitation is calculated. Options include"week", "month" or unspecified (see details).

Details

If method is "week" or left unspecified, monthly precipitation values are spline interpolated to a weekly time period and the minimum weekly precipitation is returned. If method is "month", the minimum monthly precipitation is returned.

Value

a single numeric value of total precipitation in the driest week or month of the year.

See Also

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

Examples

1
2
3
4
5
6
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")
bio14(prec, tme)
bio14(prec, tme, method="week")
bio14(prec, tme, method="month")

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