Learn R Programming

FlowScreen (version 2.0)

pks: Get the flow peaks over a threshold

Description

This function finds the flow peaks over a user defined threshold and declusters to remove dependent peaks.

Usage

pks(TS, Dur = 5, Qmax = 0.95)

Value

Returns a numeric vector of peaks of threshold values in m3/s. The "times" attribute contains the date by calendar year, and the "names" attribute contains the hydrologic year and hydrologic day of year, e.g., 2012 55.

Arguments

TS

data.frame of streamflow time series loaded with read.flows.

Dur

numeric value of the minimum number of days between peaks

Qmax

numeric value for peaks over threshold quantile. Default is 0.95.

Author

Jennifer Dierauer

Details

Peaks Over Threshold values are calcuated as mean daily streamflow (m3/s) minus the threshold streamflow value (m3/s) defined by the input quantile (Qmax). Peaks are identified with pot and the minimum inter-event duration (Dur) is applied by decluster.

Examples

Run this code
data(caniapiscau)
cania.ts <- create.ts(caniapiscau, hyrstart = 4)
cania.ts <- drop.years(cania.ts)
cania.ts <- set.plot.titles(cania.ts, 
title.elements = c("StationID", "StnName", "StateProv"))

res <- pks(cania.ts)
res2 <- screen.metric(res, ylabel = "Peak Over Threshold (m3/s)", title = TRUE)

Run the code above in your browser using DataLab