calc_rateChange: Indices describing rate of change of flow.

View source: R/calc_rateChange.R

calc_rateChangeR Documentation

Indices describing rate of change of flow.

Description

Calculates 9 indices used to describe the rate of change of flow conditions. See Table X in the EflowStats package vignette for a full description of indices.

Usage

calc_rateChange(
  x,
  yearType = "water",
  wyMonth = 10L,
  digits = 3,
  pref = "mean",
  ...
)

Arguments

x

A dataframe containing a vector of date values in the first column and vector of numeric flow values in the second column.

yearType

A charcter of either "water" or "calendar" indicating whether to use water years or calendar years, respectively.

wyMonth

A numeric. The month of the year in which the water year starts (1=January, 12=December). The water year begins on the first day of wyMonth.

digits

A numeric. Number of digits to round indice values

pref

A character of either "mean" or "median", indicating whether to use mean or median. See details.

...

Optional arguments needed for calc_allHIT function

Details

Descriptions of indices.

  • ra1; Rise rate. Compute the change in flow for days in which the change is positive for the entire flow record. RA1 is the mean (or median-Use Preference option) of these values.

  • ra2; Variability in rise rate. Compute the standard deviation for the positive flow changes. RA2 is 100 times the standard deviation divided by the mean.

  • ra3; Fall rate. Compute the change in flow for days in which the change is negative for the entire flow record. RA3 is the mean (or median-Use Preference option) of these values.

  • ra4; Variability in fall rate. Compute the standard deviation for the negative flow changes. RA4 is 100 times the standard deviation divided by the mean.

  • ra5; Number of day rises. Compute the number of days in which the flow is greater than the previous day. RA5 is the number of positive gain days divided by the total number of days in the flow record.

  • ra6; Change of flow. Compute the log of the flows for the entire flow record. Compute the change in log of flow for days in which the change is positive for the entire flow record. RA6 is the median of these values.

  • ra7; Change of flow. Compute the log of the flows for the entire flow record. Compute the change in log of flow for days in which the change is negative for the entire flow record. RA7 is the median of these log values.

  • ra8; Number of reversals. Compute the number of days in each year when the change in flow from one day to the next changes direction. RA8 is the average (or median - Use Preference option) of the yearly values.

  • ra9; Variability in reversals. Compute the standard deviation for the yearly reversal values. RA9 is 100 times the standard deviation divided by the mean.

Value

A data.frame of flow statistics

Examples

x <- sampleData[c("date","discharge")]
yearType = "water"
calc_rateChange(x=x,yearType=yearType)

USGS-R/EflowStats documentation built on Sept. 30, 2023, 9:31 p.m.