perform_filtering {baseflow}R Documentation

Baseflow filtering function

Description

Function provided by package baseflow to compute baseflow variables from a raw BaseflowFilter object. It must be called after calling the BaseflowFilter function.

Usage

perform_filtering(filter)

Arguments

filter

A BaseflowFilter object created by BaseflowFilter function.

Details

Providing a non-BaseflowFilter object creates an error. The function calls a Rust routine to compute vectors R (baseflow) and V (reservoir level) from parameters and hydroclimatic data stored in filter object.

Value

A BaseflowFilter object with the same parameters and BasinData slots as input, but R, V and update slots are replaced by computed values.

Author(s)

Pelletier and Andreassian (antoine.pelletier@irstea.fr)

References

Pelletier, A. and Andréassian, V.: Hydrograph separation: an impartial parametrisation for an imperfect method, Hydrol. Earth Syst. Sci., 24, 1171–1187, doi: 10.5194/hess-24-1171-2020, 2020

See Also

BaseflowFilter

BaseflowFilter

bfi

Examples

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)

[Package baseflow version 0.13.2 Index]