group2: Calculates the group2 IHA statistics

group2R Documentation

Calculates the group2 IHA statistics

Description

The group 2 statistics measure the magnitude of monthly water condition and include 12 parameters. This will calculate several metrics for each year of the 1-D zoo input x.

Usage

group2(x, yearType = c("water", "calendar"), mimic.tnc = T, ...)

Arguments

x

A zoo timeseries object containing the flow series

yearType

The type of year factor to be used when determining statistcs, yr = 'water' or yr ='calendar' for water years and calculated years respectively

mimic.tnc

should the function perform the calculation like the TNC IHA software? If mimic.tnc is TRUE, then running means will be calculated for each year individually and will not use data from the previous or next year, thereby

...

additional arguments passed to ddply. Likely not used without modificiation to this function

Details

This function divides the zoo by water or calendar year and finds the 1, 3, 7, 30, and 90 day rolling averages of the zoo. Then, it finds the range, base index, and days of zero flow of each year, with base index defined as the minimum 7-day flow divided by the average flow

Value

a data frame with the group 2 statistics for each year

Author(s)

jason.e.law@gmail.com (imported to Hydrotools by Connor Brogan,connor.brogan@deq.virginia.gov)

References

http://www.conservationgateway.org/Files/Pages/indicators-hydrologic-altaspx47.aspx

Examples

# #Get data for NF Shenandoah Mount Jackson
# flows <- dataRetrieval::readNWISdv("01633000",parameterCd = "00060")
# flows <- dataRetrieval::renameNWISColumns(flows)
# #Convert flows to zoo
# flows_zoo <- zoo::as.zoo(x = flows$Flow)
# zoo::index(flows_zoo) <- flows$Date
# #Use group 2 to get critical period flows and stats:
# hydrotools::group2(flows_zoo,"water",mimic.tnc = TRUE)

HARPgroup/hydro-tools documentation built on July 4, 2025, 11:05 a.m.