Learn R Programming

baseflow (version 0.13.2)

bfi: Baseflow index computing function

Description

Function provided by package baseflow to compute baseflow index from a BaseflowFilter object.

Usage

bfi(filter)

Arguments

filter

A BaseflowFilter object created by BaseflowFilter function.

Value

A numeric giving computed baseflow index.

Details

Computes baseflow index from a BaseflowFilter object, created by BaseflowFilter function. If the baseflow values have not been computed yet in the object, a Rust routine is called to compute baseflow ; else, baseflow is computed directly from baseflow and observed streamflow values. Providing a non-BaseflowFilter object creates an error.

References

Pelletier, A. and Andr<U+00E9>assian, V.: Hydrograph separation: an impartial parametrisation for an imperfect method, Hydrol. Earth Syst. Sci., 24, 1171<U+2013>1187, 10.5194/hess-24-1171-2020, 2020

See Also

'>BaseflowFilter

BaseflowFilter

perform_filtering

Examples

Run this code
# NOT RUN {
library(baseflow)

# Loading example data from airGR package
data(L0123001, package = 'airGR')

# Defining BasinData object

Name <- BasinInfo$BasinName
startDate <- BasinObs$DatesR[1]
endDate <- BasinObs$DatesR[length(BasinObs$DatesR)]
P <- BasinObs$P
PET <- BasinObs$E
Qobs <- BasinObs$Qmm

BasinData_Example <- BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "GR4J")

# Creating BaseflowFilter object
BaseflowFilter_Example <- BaseflowFilter(BasinData_Example, 1000, updateFunction = 'quadr')

# Computing baseflow
BaseflowFilter_Example <- perform_filtering(BaseflowFilter_Example)

# Plotting computed separation
plot(BaseflowFilter_Example)

# Computing baseflow index
bfi(BaseflowFilter_Example)
# }

Run the code above in your browser using DataLab