calc_timingHigh: Indices describing timing of high flow events.

View source: R/calc_timingHigh.R

calc_timingHighR Documentation

Indices describing timing of high flow events.

Description

Calculates 3 indices used to describe the timing of high flow conditions. See Table X in the EflowStats package vignette for a full description of indices.

Usage

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

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.

floodThreshold

Numeric flood threshold as the flow equivalent for a flood recurrence of 1.67 years

...

Optional arguments needed for calc_allHIT function

Details

Descriptions of indices.

  • th1 Julian date of annual maximum. Determine the Julian date that the maximum flow occurs for each year. Transform the dates to relative values on a circular scale (radians or degrees). Compute the x and y components for each year and average them across all years. Compute the mean angle as the arc tangent of y-mean divided by x-mean. Transform the resultant angle back to Julian date.

  • th2 Variability in Julian date of annual maxima. Compute the coefficient of variation for the mean x and y components and convert to a date.

  • th3 Seasonal predictability of nonflooding. Computed as the maximum proportion of a 365-day year that the flow is less than the 1.67-year flood threshold and also occurs in all years. Accumulate nonflood days that span all years. TH3 is maximum length of those flood-free periods divided by 365.

Note: In these definitions, "Julian date" should be interpreted as the count of days starting with 1 on January first of a given year, ending at 365 or 366 on December 31st.

Value

A data.frame of flow statistics

Examples

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

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