convolution: Convolution of net rainfall with unit hydrograph

View source: R/convolution.R

convolutionR Documentation

Convolution of net rainfall with unit hydrograph

Description

Simulate the discharge by a convolution between the unit hydrograph and the net rainfall.

Usage

convolution(Rn, ...)

## Default S3 method:
convolution(Rn, uh, continuous = FALSE, ...)

## S3 method for class 'units'
convolution(Rn, uh, ...)

## S3 method for class 'transfR'
convolution(
  Rn,
  Rcol = "RnSim",
  Qcol = "Qsim",
  save_donor = FALSE,
  verbose = TRUE,
  ...
)

Arguments

Rn

net rainfall vector or an object of class transfR

...

further arguments passed to or from other methods

uh

unit hydrograph vector

continuous

logical indicating whether simulated values should be omitted when a time step might be influenced by past or future rainfall (according to the time span of the unit hydrograph)

Rcol

name of the space-time attribute for the net rainfall simulation in the transfR object

Qcol

name of the space-time attribute for the discharge in the transfR object

save_donor

logical indicating if additional discharge simulations should be computed using the net rainfall of each individual donor catchment instead of just the weighted average net rainfall. This requires save_donor to have been TRUE when using mixr

verbose

logical indicating if information messages should be written to the console

Value

An object of the same class as Rn. If Rn is a transfR object, it is returned with the computed results added as new attributes.

Examples

data(Oudon)
icatch <- 1
uc <- velocity(hl = Oudon$hl[[icatch]])
uh <- uh(hl = Oudon$hl[[icatch]], uc = uc, deltat = units::set_units(1,"h"))$prob
Rn <- units::set_units(c(1,5,2), "mm/h")
Qsim <- convolution(Rn = Rn, uh = uh)

transfR documentation built on July 24, 2026, 5:06 p.m.