Learn R Programming

FlowScreen (version 0.9)

metrics.all: Streamflow metrics

Description

Calculates 30 different flow metrics, 10 each for high flows, low flows, and baseflow.

Usage

metrics.all(TS, Qmax = 0.95, Dur = 5, Qdr = 0.2, WinSize = 30,
  Season = c(4:9), NAthresh = 0.5, language = "English")

Arguments

TS
output from create.ts containing a data.frame of flow time series
Qmax
Numeric value for peaks over threshold quantile. Default is 0.95.
Dur
Numeric value for minimum number of days between flood peaks. Default is 5.
Qdr
Numeric value for drought quantile. Default is 0.2, i.e. the 80th percentile of the flow duration curve.
WinSize
Numeric value for moving window size (in days) for the moving window quantile drought threshold. See mqt. Default is 30.
Season
Numeric vector of months during which droughts start. Default is c(4:9) for non-frost season droughts.
NAthresh
Numeric value indicating the threshold for missing data points in any one year. Default is 0.5, indicating that years with more than 50 percent missing data will be omitted from the metric calculations. This value should always be set to greater than
language
Character string indicating the language to be used for naming the different plot metrics. These names are used in screen.summary to label individual plots. Options are "English" or "French". Defa

Value

  • Returns a list with the following elements: metricTS: a list containing a vector of each metric calculated. Each vector has a times attribute providing either the year for metrics with one observation per year or a date for metrics that may have more than one observation per year (e.g., Peaks Over Threshold). This list has the following elements:
    • Annual Maximum Series - calculated withpk.max
    • Day of Annual Maximum - calculated withpk.max.doy
    • Peaks Over Threshold (Qmax) - calculated withpks
    • Inter-Event Duration - calculated withpks.dur
    • Q80 - calculated withQn
    • Q90 - calculated withQn
    • Day of Year 25 percent Annual Volume - calculated withpk.cov
    • Center of Volume - calculated withpk.cov
    • Day of Year 75 percent Annual Volume - calculated withpk.cov
    • Duration between 25 percent and 75 percent Annual Volume - calculated withcov
    • Q10 - calculated withQn
    • Q25 - calculated withQn
    • Drought Start - calculated withdr.seas
    • Drought Center - calculated withdr.seas
    • Drought End - calculated withdr.seas
    • Drought Duration - calculated withdr.seas
    • Drought Severity - calculated withdr.seas
    • Annual Minimum Flow - calculated withMAMn
    • Mean Annual Minimum 7-day Flow - calculated withMAMn
    • Mean Annual Minimum 10-day Flow - calculated withMAMn
    • Mean Daily Discharge - calculated withbf.stats
    • Annual Baseflow Volume - calculated withbf.stats
    • Annual Mean Baseflow - calculated withbf.stats
    • Annual Maximum Baseflow - calculated withbf.stats
    • Annual Minimum Baseflow - calculated withbf.stats
    • Mean Annual Baseflow Index - calculated withbf.stats
    • Day of Year 25 percent Baseflow Volume - calculated withpk.bf.stats
    • Center of Volume Baseflow - calculated withpk.bf.stats
    • Day of Year 75 percent Baseflow Volume - calculated withpk.bf.stats
    • Duration between 25 percent and 75 percent Baseflow Volume - calculated withpk.bf.stats
    tcpRes: this list contains the results of the trend and changepoint analysis for each of the metrics in the metricTS list described above. Each list element is a list containing the following elements:
    • MetricID - integer used to identify the metric
    • MetricName - Name of the metric.
    • Slope - numeric vector containing the intercept and slope of the prewhitened linear trend calculated using the Yue Pilon method. Seezyp.trend.vector
    • ci1 - upper bound of the trend's 95 percent confidence interval
    • ci2 - lower bound of the trend's 95 percent conficence interval
    • pval - Kendall's P-value computed for the detrended time series
    • cpts - Most probable location of a changepoint, if one is detected.
    • means - Mean before and after the changepoint
    • NumObs - The number of data points for the metric
    inData: A data.frame of the original input daily streamflow time series. OmitYrs: A data.frame containing the years and the number of observations for any years omitted from the analysis due to insufficient data. If no years were omitted, NA is returned.

Details

This function calculates streamflow metrics and calculates the prewhitened trend using zyp.trend.vector and looks for changpoints in mean and variance using cpt.meanvar This function is intended for use as a data quality screening tool aimed at identifying streamflow records with anthropogenic impacts and should not be used to complete a temporal trend analysis, as the calculated metrics may not be appropriate for all catchments. See the functions linked in the following section for details on how each metric is calculated.

See Also

See the documentation for individual functions linked in the output description for a details on methods. See screen.metric to create individual plots for each metric.

Examples

Run this code
# load subset of daily streamflow time series for the Caniapiscau River
data(cania.sub.ts)

# further subset to meet maximum example run-time requirements
cania.sub.ts <- subset(cania.sub.ts, cania.sub.ts$hyear %in% c(1973:1987))

# calculate low flow, high flow, and baseflow metrics
res <- metrics.all(cania.sub.ts)

Run the code above in your browser using DataLab