CalcFdcSpline: Generate a spline-fit funtion for a flow duration curve

Description Usage Arguments Details Value See Also Examples

View source: R/calculate_fdc.R

Description

CalcFdcSpline generates a spline fit function for a flow duration curve.

Usage

1
CalcFdcSpline(strDf, strCol = "q_cms")

Arguments

strDf

The streamflow time series dataframe (e.g., output from ReadFrxstPts or ReadUsgsGage) already processed through CalcFdc. The data frame must contain a column of streamflow values and a corresponding column (named "<strCol>.fdc") of flow exceedance probabilities.

strCol

The name of the column containing the streamflow values (DEFAULT="q_cms").

Details

CalcFdcSpline reads the percent exceedances generated by CalcFdc and outputs a fitted spline function useful for plotting or estimating flow at specified exceedance thresholds (e.g., 20% exceedance probability).

Value

A spline function fitted to flow (y) vs. flow exceedance probabilities (x).

See Also

Other flowDurationCurves: CalcFdc, PlotFdcCompare, PlotFdc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Take a time series of observed 5-minute streamflow values for Fourmile
## Creek (stored in the dataframe obsStr5min.fc in the column "q_cms") that
## has already been processed through "CalcFdc" (so also contains a column 
## named "q_cms.fdc") and return a spline fit function.
## Not run: 
fdc.obsStr5min.fc <- CalcFdcSpline(obsStr5min.fc, "q_cms")

## Use the spline function to estimate the flow value that is exceeded 20% of the time.

fdc.obsStr5min.fc(0.2)
> 0.72

## End(Not run)

mccreigh/rwrfhydro documentation built on Feb. 28, 2021, 1:53 p.m.