hydro.year | R Documentation |
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
.
hydro.year(flow.ts, hydro.year = "hydro", year.only=FALSE)
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. |
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.
Nick Bond <n.bond@latrobe.edu.au>
high.spells
, low.spells
.
data(Cooper) Cooper<-ts.format(Cooper) head(hydro.year(Cooper)) head(hydro.year(Cooper, year.only=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.