find_droughts {lfstat} | R Documentation |
Identifying Low Flow Periods
Description
A streamflow deficit is defined as an event where discharges are below a given threshold.
Usage
find_droughts(x, threshold = vary_threshold, varying = "constant", interval = "day", ...)
Arguments
x |
an object which can be coerced to class |
threshold |
The threshold can either be a constant value, a time series with the same length as |
varying |
if |
interval |
A character string, containing one of "day", "week", "month", "quarter" or "year" as accepted by |
... |
if threshold is a function, these additional arguments are passed on to the function |
Value
an object of class 'deficit'
, which is basically an 'xts'
object with the columns
discharge |
discharges as provided with |
threshold |
the threshold |
def.increase |
The increase of the deficit volume in m^3 per day. |
event.no |
an event id. If an event is numbered "0" this period not considered as a streamflow deficit. |
See Also
There are summary and plot methods, see summary.deficit
and plot.deficit
.
pooling
, summary.deficit
, plot.deficit
Examples
data(ray)
ray <- as.xts(ray)["1970::1979", ]
r <- find_droughts(ray)
head(r)
summary(r)
plot(r)
# threshold is to low, because there are many days with
# zero flow observations
# provide threshold as a constant value
r <- find_droughts(ray, threshold = 0.02)
head(r)
summary(r)
plot(r)
# provide threshold as a function
r <- find_droughts(ray,
threshold = function(x) quantile(x, 0.2, na.rm = TRUE))
head(r)
summary(r)