| inversion | R Documentation |
Estimate net rainfall by inverse modelling, where the model is a convolution between net rainfall and a unit hydrograph in order to simulate discharge.
inversion(Qobs, ...)
## Default S3 method:
inversion(Qobs, uh, RnAp, deltat, ...)
## S3 method for class 'units'
inversion(
Qobs,
uh,
RnAp,
deltat,
Bd = 0.01,
Dd = 1,
Bp = 0.001,
Tp = 20,
Ad = 0.01,
Ap = 0.9,
warmup = 10,
cooldown = 8,
dosplit = TRUE,
split = 30,
fixedpar = TRUE,
parallel = FALSE,
cores = NULL,
cluster = NULL,
...
)
## S3 method for class 'transfR'
inversion(
Qobs,
verbose = TRUE,
parallel = FALSE,
cores = NULL,
cluster = NULL,
...
)
Qobs |
discharge vector or object of class |
... |
further arguments passed to or from other methods |
uh |
unit hydrograph vector |
RnAp |
a priori estimate of net rainfall. If no unit is provided, |
deltat |
time step of the time series. If no unit is provided, |
Bd |
parameter used to maintain a minimum value of standard deviation for low discharge values.
If no unit is provided, |
Dd |
decorrelation time of discharge errors. If no unit is provided, |
Bp |
parameter used to maintain a minimum value of standard deviation for low net rainfall values.
If no unit is provided, |
Tp |
decorrelation time of net rainfall errors. If no unit is provided, |
Ad |
parameter equivalent to the coefficient of variation of the discharge measurement error. If
no unit is provided, |
Ap |
parameter equivalent to the coefficient of variation of the net rainfall error. If no unit
is provided, |
warmup |
length of the warmup period. If no unit is provided, |
cooldown |
length of the period removed at the end of the simulation. If no unit is provided,
|
dosplit |
logical, if true the inversion is performed by
subperiods of length defined by |
split |
length of the subperiods if dosplit is true. If no unit is provided, |
fixedpar |
logical; if FALSE, Ap and Ad are calibrated dynamically according to the coefficient of variation of RnAp and Qobs respectively (see details) |
parallel |
logical indicating whether the computation should be parallelised.
Subperiods are parallelised for a single time series, whereas catchments are
parallelised for a |
cores |
the number of cores to use for parallel execution if |
cluster |
an optional parallel cluster to reuse |
verbose |
logical indicating if information messages should be written to the console |
Given a convolution between the unit hydrograph (uh) and net rainfall that simulates
streamflow at the outlet (Qobs), where net rainfall is the only unknown variable, this function estimates
net rainfall by inversion \insertCiteTarantola1982,Menke1989,Boudhraa2018transfR. It requires an
a priori estimate of net rainfall (which can be obtained with rapriori) and a description
of errors in discharge (Ad, Bd, Dd) and net rainfall (Ap,
Bp, Tp); these errors are assumed to be Gaussian and unbiased. Default values of these parameters
are taken from \insertCitedeLavenne2016;textualtransfR. If fixedpar is deactivated, Ap
is estimated at 20
of variation of Qobs.
It is recommended to use warmup and cooldown periods to reduce oscillations
caused by inversion.
If Qobs is a transfR object, results are stored in a new space-time attribute
called "RnInv".
An object of the same class as Qobs. If Qobs is a transfR object,
it is returned with the computed results added as new attributes.
Boudhraa2018transfR
\insertRefdeLavenne2016transfR
\insertRefMenke1989transfR
\insertRefTarantola1982transfR
rapriori
data(Oudon)
icatch <- 1 # Catchment index
itime <- 1:1000 # Using the first values for a quicker example
Qobs <- Oudon$obs[["Qobs"]][itime,icatch]
Qspec <- units::set_units(Qobs/st_area(st_geometry(Oudon$obs)[icatch]), "mm/h")
deltat <- units::set_units(1, "h")
uc <- velocity(hl = Oudon$hl[[icatch]])
uh <- uh(hl = Oudon$hl[[icatch]], uc = uc, deltat = units::set_units(1,"h"))$prob
RnAp <- rapriori(Qobs = Qspec, lagtime = lagtime(hl = Oudon$hl[[icatch]], uc = uc),
deltat = deltat)
RnInv <- inversion(Qobs = Qspec, RnAp = RnAp, uh = uh, deltat = deltat, parallel = TRUE, cores=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.