rapriori: Net rainfall a priori estimation

Description Usage Arguments Details Value Examples

View source: R/rapriori.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 value or object of class transfR. If no unit is provided, Qobs is assumed to be in [m3/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 [km2].

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

boolean indicating if information messages should be written to the console

Details

The function estimates an a priori of the 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 that could be estimated from the function 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 of Qobs. If Qobs is a transfR object, the same transfR object incremented by the new "RnAp" computed attributes.

Examples

1
2
3
4
5
6
7
8
9
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 Sept. 8, 2021, 9:08 a.m.