Description Usage Arguments Details References Examples
Returns the indices of the peaks above a threshold according to the declustering method put in place by the Water Resources Council or simple run declustering. See Lang et al. (1999) for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | which.floodPeaks(x, ...)
## S3 method for class 'numeric'
which.floodPeaks(x, dt = NULL, u, r = 1,
rlow = 0.75, ini = "wrc")
## S3 method for class 'formula'
which.floodPeaks(form, x, u, ...)
## S3 method for class 'data.frame'
which.floodPeaks(x, u, ...)
which.clusters(x, ...)
## S3 method for class 'formula'
which.clusters(form, x, u, r = 1)
## S3 method for class 'numeric'
which.clusters(x, dt = NULL, u, r = 1)
|
x, form |
If numeric, |
dt |
Date or time of observations. If not provided, regular step are asumed. @param u Threshold. |
r, rlow, ini |
Declustering parameters. See details. |
Two conditions are required for peaks to not be
rejected. First, two peaks Q1
and Q2
must be separated by a
period of at least r
days, where one recommendation is
4 days + log(A)
and A is the drainage area in squared kilometers. The second conditions is
Xmin > rlow * min(Q1,Q2).
where Xmin
is lowest point
between Q1
and Q2
. By defautlt, rlow = 0.75
.
When one of the two conditions is not statisfied the lowest of the two
peaks is discarded.
The 2 conditions are verify sequentially, from an initial set of peaks.
If ini = 'run'
, a run declustering method with one lag is first used to
filter the initial set of peaks to the maximums of the respective clusters.
If ini = 'lmax'
the 2 condition are verified accross all local maximums.
If ini = 'wrc'
(default), the second condition id verified
next the first condition is verify on the previously extracted peaks.
The two version are very similar and differ only on few cases where the
modified version is more conservative and reject peaks that are kept
in the initial version.
The function which.clusters
is returning the indices of the peaks
identified by the run declustering method where clusters are separated by a
period of r
consecutive values under the threshold.
Lang M, Ouarda TBMJ, Bobée B. (1999) Towards operational guidelines for over-threshold modeling. Journal of Hydrology. Dec 6;225(3):103–17.
1 2 3 4 5 6 7 8 9 10 11 12 | # Declustering using the flood recommendation.
cid <- which.floodPeaks(flow~date, flowStJohn, u = 1000, r = 14, rlow = .75,
ini = 'wrc')
plot(flowStJohn, type = 'l')
points(flowStJohn[cid,], col = 'red', pch = 16)
## Simpler run declustering
cid <- which.clusters(flowStJohn$flow, u = 1000, r = 14)
plot(flowStJohn, type = 'l')
points(flowStJohn[cid,], col = 'red', pch = 16)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.