recess: Recessions

View source: R/recess.R

recessR Documentation

Recessions

Description

Identify surface-water recessions

Usage

recess(Flow, Dates, Start = NULL, End = NULL, by = NULL,
  min.duration = 10, max.duration = 300, check.srmse = 0.1,
  STAID = "Unknown")

Arguments

Flow

the streamflow data to be analyzed. Missing values are not permitted within the time specified by Start and end.

Dates

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

Start

the start date for the analysis, can be either a character string or class "Date."

End

the end date for the analysis, can be either a character string or class "Date."

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


## Not run: 
library(smwrData)
data(ChoptankFlow)
with(ChoptankFlow, recess(Flow, datetime, STAID="0191000"))

## End(Not run)

USGS-R/DVstats documentation built on Oct. 11, 2022, 6:03 a.m.