corr_crit {baseflow} | R Documentation |
Computation function of correlation criterion used by package baseflow
to calibrate parameters of the baseflow separation algorithm. A vectorized version of this function correlation_criteria_vectorized
also exists.
corr_crit(BasinData, alpha, tau, updateFunction = "quadr")
BasinData |
A |
alpha |
Numeric parameter of the filtering reservoir. Its dimension depends on the used update function. Must be positive. |
tau |
Number of days used to compute cumulative effective rainfall. Must be a positive integer or any object that can be coerced to a positive integer. |
updateFunction |
Character string giving reservoir function : must be one of |
NA values are not permitted for parameters alpha
and tau
. If a vector is supplied, the first element is used.
Usage of gradient-based optimization algorithms is not recommended to find the maximum value of this criterion. It is a better option to use vectorized function correlation_criteria_vectorized
to perform a grid-search; a non-gradient-based optimization algorithm, like differential evolution, may be used to refine the optimal point afterwards.
A numeric value of the computed criterion, between -1 and 1.
Pelletier and Andreassian (antoine.pelletier@irstea.fr)
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 criterion corr_crit(BasinData_Example, 1500, 110, updateFunction = "quadr")