find_flood_drought: Detect floods and droughts based on Mckee et al. (1993)

Description Usage Arguments Details Value Author(s) Examples

Description

find_flood_drough detect events of floods and droughts based on the definition proposed by Mckee et al. (1993) using a time series of standardized precipitation values. A drought (flood) is defined as a period of time in which the SPI is continuously negative (positive) reaching at least one value lower (higher) or equal to -1 (1).

Usage

1
2
find_flood_drought(spi, threshold = qnorm(1 - 0.05/2),
  labels = c("normal", "drought", "flood"))

Arguments

spi

A vector representing the time series of the standardized values.

threshold

An numeric value used to detect the extreme events, 1 (-1) is used by default as proposed by Mckee et al. (1993).

labels

A character vector providing the labels used to return the three types of events normal, drought and flood.

Details

Although the definition of Mckee et al. (1993) uses a threshold of 1 (-1). Other values can be used for this threshold.

Value

A factor vector indicating the time of event the standardized precipitation value corresponds.

Author(s)

Erick A. Chacon-Montalvan

Examples

1
2
3
4
5
6
data(simrain)
# Compute standardized values
spi_rain <- mbsi(simrain$rain, simrain$time)
# Identify floods and droughts
spi_rain$event <- find_flood_drought(spi_rain$spi, threshold = 2)
spi_rain$event

ErickChacon/mbsi documentation built on Aug. 1, 2019, 4:47 p.m.