N.B.:: This function is the one used internally by hb_global to
compute residence times, and is not directly exported by {erahumed}
.
Computes residence times as \(t = \overline{\text{Volume}} / \overline{\text{Outflow}} \), where \(\overline {\cdot}\) denotes a (symmetric) moving average.
Usage
hbg_residence_time(volume, outflow_total, k = 61, units = c("days", "seconds"))
Arguments
- volume
numeric vector. Time series of volumes in \(\text{m}^3\).
- outflow_total
numeric vector. Time series of total outflow in \(\text{m}^3 / \text{s}\).
- k
positive integer. Size of the window in the moving average. The default is of the order of magnitude of actual residence time for the Albufera Lake.
- units
either
"days"
or"seconds"
. Units of measure for the returned time series.