corr_crit_vect {baseflow}R Documentation

Baseflow vectorized correlation criteria computation

Description

Vectorized computation function of correlation criteria used by package baseflow to calibrate parameters of the baseflow separation algorithm. A scalar version of this function correlation_criteria also exists.

Usage

corr_crit_vect(BasinData, alphas, taus, updateFunction = "quadr")

Arguments

BasinData

A BasinData object containing hydroclimatic data for the catchment under study.

alphas

Numeric vector of parameters of the filtering reservoir. Their dimension depends on the used update function. They must be positive.

taus

Vector of numbers of days used to compute cumulative effective rainfall. Must be an integer vector or any object that can be coerced to an integer vector. All values must be positive.

updateFunction

Character string giving reservoir function : must be one of "quadr", "lin" or "exp". Default is "quadr".

Details

Providing empty vectors or vectors containing missing or non-positive values for parameters alphas and taus throws an error.

Value

A dataframe containing four columns and length(alphas) * length(taus) rows. Colums are the following:

alpha

Values of alpha

tau

Values of tau

bfi

Values of baseflow index, which depends on alpha

crit

Computed values of correlation criterion

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

perform_filtering

BaseflowFilter

corr_crit

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")

# Computing correlation criteria
data_crit <- corr_crit_vect(BasinData_Example,
                            alphas = seq(from = 100, to = 2000, by = 100),
                            taus = seq(from = 10, to = 370, by = 10),
                            updateFunction = "quadr")

[Package baseflow version 0.13.2 Index]