recess: Recessions

Description Usage Arguments Details Value Examples

View source: R/recess.R

Description

Identify surface-water recessions

Usage

1
2
recess(date, discharge, by = NULL, min.duration = 10, max.duration = 300,
  check.srmse = 0.1, STAID = "Unknown")

Arguments

date

vector of dates for each x, should be of class "Date." Missing values are not permitted.

discharge

the streamflow data to be analyzed. Missing values are not permitted.

by

the months to subselect for recessions.

min.duration

the minimum duration for a recession to be selected.

max.duration

the maximum duration for a recession to be selected.

check.srmse

reject the recession if the scaled RMSE of the recesssion regression exceeds this value. See details.

STAID

the station identifier for the data.

Details

Note that zero flows are set to a value so the the common log is -2.5 in order to easily process recessions that go to 0 flow.

The scaled RMSE of the recession regression is the root-mean-squared error divided by the square root of the recession index. Large values of the scaled RMSE indicate a lack of linearity, so check.srmse can be used as a filter to remove poor fits, but at some risk of rejecting acceptable recessions. The default value of 0.1, seems to be provide good balance of rejection for poor fits and acceptance of good fits.

Value

an object of class "recess" and inherits class "data.frame" of the selected data, a data frame of the recession information, and other information about the analysis.

Examples

1
2
3
4
5
6
## Not run: 
library(smwrData)
data(ChoptankFlow)
with(ChoptankFlow, recess(Flow, datetime, STAID="0191000"))

## End(Not run)

smwesten-usgs/recharge documentation built on Jan. 27, 2020, 3:08 p.m.