rapriori: A priori net rainfall estimation

View source: R/rapriori.R

raprioriR Documentation

A priori net rainfall estimation

Description

A priori estimate of net rainfall as required for the inversion.

Usage

rapriori(Qobs, ...)

## Default S3 method:
rapriori(Qobs, area, lagtime, deltat, ...)

## S3 method for class 'units'
rapriori(Qobs, area, lagtime, deltat, ...)

## S3 method for class 'transfR'
rapriori(Qobs, verbose = TRUE, ...)

Arguments

Qobs

vector of discharge values or object of class transfR. If no unit is provided, Qobs is assumed to be in [m^3/s].

...

further arguments passed to or from other methods

area

drainage area of the catchment. If no unit is provided, area is assumed to be in [km^2].

lagtime

lag time value of the catchment. If no unit is provided, lagtime is assumed to be in [h].

deltat

time step of the time series. If no unit is provided, deltat is assumed to be in [min].

verbose

logical indicating if information messages should be written to the console

Details

The function estimates an a priori value for net rainfall from Qobs. It converts Qobs to specific discharge and removes the delay caused by transfer time in the river network (given by lagtime and which can be estimated with lagtime). If an object of class transfR is provided, area is estimated from its st attribute. Results are stored as a new space-time attribute, called "RnAp", in the transfR object.

Value

An object of the same class as Qobs. If Qobs is a transfR object, it is returned with the "RnAp" attribute added.

Examples

data(Oudon)
icatch <- 1
Qobs <- Oudon$obs[["Qobs"]][,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 = deltat)$prob
RnAp <- rapriori(Qobs = Qspec, lagtime = lagtime(hl = Oudon$hl[[icatch]], uc = uc),
deltat = deltat)

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