rsimilarity function

Similarity of net rainfall time series

Similarity of net rainfall time series

Calculate the similarity of net rainfall time series

rsimilarity(Rn, FUN = "invKGE", parallel = FALSE, cores = NULL)

Arguments

  • Rn: net rainfall matrix of gauged catchments (rows for time index, and columns for catchment index)
  • FUN: either a function or a character string specifying the name of a predifined function to quantify the similarity of two net rainfall time series. Higher values should indicate a higher probability of similarity. Predefined functions include: "KGE" (Kling–Gupta efficiency), "invRMSE" (inverse of root mean square error), "invKGE" (inverse of (KGE-1)) and "RMSE" (root mean square error, should not be directly used as a similarity metric). The default is "invKGE"
  • parallel: logical indicating whether the computation should be parallelised
  • cores: the number of cores to use for parallel execution if parallel is TRUE. If not specified, the number of cores is set to the value of parallel::detectCores()

Returns

A square matrix of the similarity metric between each pair of catchments

Examples

data(Oudon) obs <- as_transfr(st = Oudon$obs, hl = Oudon$hl) obs <- velocity(obs, method = "loire2016") obs <- uh(obs) obs <- lagtime(obs) obs <- rapriori(obs) obs <- inversion(obs, parallel = TRUE, cores=2) msim <- rsimilarity(Rn = obs$st$RnInv, FUN="KGE", parallel = TRUE, cores=2)

See Also

rsimilarity_model