hydro.year: Determine hydrologic year for the purposes of deriving spell...

Description Usage Arguments Value Author(s) See Also Examples

Description

Defines a hydrologic year to minimise the risk that defined spells are interrupted by transitions between calendar years. The function can be called by several other functions in the hydrostats package (e.g. high.spells, low.spells, high.spell.lengths.

Usage

1
hydro.year(flow.ts, hydro.year = "hydro", year.only=FALSE)

Arguments

flow.ts

Dataframe with date and discharge data in columns named "Date" and "Q" respectively. Date must be in POSIX format (see ts.format).

hydro.year

hydro.year="hydro" calculates the hydrologic year and returns a dataframe with an additional column indiating the hydrologic year to which each observation belongs. The hydrologic year is defined as starting in the first month of the average driest 6 month period across all years. This maximises the likelihood that low-flow and high-flow spells will be contained within a rolling 12 month period.

Other options may be added in the future.

year.only

logical. If FALSE (default), a column indicating the hydrologic year of each record is added to the original data.frame. If TRUE, a vector indicating the hydrologic year of each record is returned.

Value

If year.only=FALSE (default), the function returns the original dataframe with an added column "hydro.year" indicating the hydrologic year to which each case belongs. Otherwise, if year.only=TRUE, a vector of hydrologic years is returned.

Author(s)

Nick Bond <n.bond@latrobe.edu.au>

See Also

high.spells, low.spells.

Examples

1
2
3
4
5

Example output

        Date Q hydro.year
1 1967-01-01 0       1966
2 1967-01-02 0       1966
3 1967-01-03 0       1966
4 1967-01-04 0       1966
5 1967-01-05 0       1966
6 1967-01-06 0       1966
[1] 1966 1966 1966 1966 1966 1966

hydrostats documentation built on May 6, 2019, 1:02 a.m.