Last chance! 50% off unlimited learning
Sale ends in
Finds independent events greater than or less than a specified criterion. High (or low) -flow days occurring on consecutive days are considered part of one event. This function can be used to find events exceeding 2- or 10- year return levels (as calculated in lp3Events
function, for example), or to find residual flows of a certain magnitude.
independentEvents(cutoff.val, data, data.column, below.cutoff=FALSE)
Numeric specifying event criterion.
Data matrix or data frame with one column of streamflow data.
Numeric; specifies column in which to look for events.
Logical. TRUE to find events less than the cutoff.val
and FALSE to find events greater than the cutoff.val
.
A data.frame
with columns
Index of event start.
Index of event end.
Length (days) of event.
Maximum or minimum flow for this event.
Index of maximum or minimum flow for this event. If extreme is not unique, the chronologically first index is given.
All columns of original data, corresponding to max or min flow. These columns will have the same column names as the original data.
0 if the extreme is unique, 1 if it is not unique.
# NOT RUN {
data(sycamore)
syc.sf<-asStreamflow(sycamore)
#find 10-year flood
q10<-lp3Events(syc.sf)$Q10
#find all events greater than 10-year flood
independentEvents(q10,syc.sf$data, data.col=8 , below.cutoff=FALSE)
# }
Run the code above in your browser using DataLab