Learn R Programming

lfstat (version 0.9.12)

baseflow: Calculate the base flow of a river

Description

Given a stream flow hydrograph of flows (regular time series), the base flow is separated. The minima of a period (default block.len = 5) is calculated and turning points are identified. At turning points the base flow equals the actual flow, in between, linear interpolation is carried out.

Usage

baseflow(x, tp.factor = 0.9, block.len = 5)

Value

A numeric vector of length(x). It contains NAs as until the first turning point, the base flow cannot be determined.

Arguments

x

numeric vector containing flows

tp.factor

numeric vector of length one. Towards high flows, allow the central value of three consecutive minima only to be of a factor (1 - tp.factor) higher than the surrounding values

block.len

numeric vector of length one.

References

Tallaksen, L. M. and Van Lanen, H. A. J. 2004 Hydrological Drought: Processes and Estimation Methods for Streamflow and Groundwater. Developments in Water Science 48, Amsterdam: Elsevier.

Examples

Run this code
## reproducing Tallaksen and van Lanen (2004)
## Example 5.3 Base Flow Index"

data(ray)
ray <- as.xts(ray)

# calculate base flow and plot it
ray$baseflow <- baseflow(ray$discharge)
ray96 <- ray[format(time(ray), "%Y") == "1996", ]
plot(ray96$discharge, type = "l")
lines(ray96$baseflow, col = 2)

# aggregated base flows for river Ray
# these are mean flow totals per day, not per year as written
# in Tallaksen and van Lanen (2004)
round(colSums(ray96[, c("discharge", "baseflow")]), 2)

Run the code above in your browser using DataLab