Wrap up all the modelling steps into one function for a quick implementation of this R package.
quick_transfr(
obs,
sim,
velocity = "loire2016",
distance = "rghosh",
gres = 5,
weightO = 0.8,
weightC = 0.2,
power = 1,
ndonors = 5,
maxdist = 50000,
flexible_donor = TRUE,
cv = FALSE,
save_donor = FALSE,
warmup = 10,
cooldown = 8,
dosplit = TRUE,
split = 30,
parallel = FALSE,
cores = NULL,
verbose = TRUE
)The sim object incremented by the new computed attributes
"transfR" object of the gauged catchments
"transfR" object of the ungauged catchments
character string describing the method to estimate the streamflow velocity.
See velocity for the available options (method argument)
character string describing the method to compute the distance between catchments.
See hdist for the available options (method argument)
resolution of spatial discretisation (number of points by km²) for Ghosh distance. See hdist for more details
weight given to the distance between outlets if distance method is "combined". See hdist for more details
weight given to the distance between centroids if distance method is "combined". See hdist for more details
exponent applied in the inverse distance weighting strategy. See weightr for more details
maximum number of catchments to be used to simulate discharge of an ungauged catchment. See weightr for more details
maximum distance between a gauged and an ungauged catchment to allow the net rainfall
to be transfered. This threshold is applied on the mdist distance matrix. If no units is provided,
maxdist is assumed to be in [m]. See mixr for more details
boolean indicating if the donor catchments can change during the simulation period according to the availability of discharge observations. See weightr for more details
boolean indicating if cross validation evaluation should be done. If true, it will estimate
the net rainfall of every gauged catchments (obs) as if they were ungauged (leave-one-out evaluation)
boolean indicating if the net rainfall of each of the ndonors catchments
should be stored in the sim object for further analysis. If true, it is adding three new space-time attributes
in the sim object called "RnDonor", "Idonor" and "Wdonor" describing the net rainfall, the id and
the weight of the donor catchments respectively. See mixr for more details
length of the warmup period. If no unit is provided, warmup is assumed to be in [days].
See inversion for more details
length of the period removed at the end of the simulation. If no unit is provided,
cooldown is assumed to be in [days]. See inversion for more details
boolean, if true the inversion is performed by
subperiods of length defined by split. See inversion for more details
length the subperiods if dosplit is true. If no unit is provided, split is assumed to be
in [days]. See inversion for more details
logical indicating if the computation should be parallelised
the number of cores to use for parallel execution if parallel is TRUE.
If not specified, the number of cores is set to the value of parallel::detectCores()
boolean indicating if information messages should be written to the console
The function applies sequentially the following functions: velocity, uh, lagtime, rapriori, inversion, hdist, mixr and convolution. Please refer to the help of each of these functions and to transfR-package for a general description of the modelling approach.
velocity, uh, lagtime, rapriori, inversion, hdist, mixr, convolution
data(Oudon)
obs <- as_transfr(st = Oudon$obs[,,1:3], hl = Oudon$hl[1:3]) #gauged catchments
sim <- as_transfr(st = Oudon$obs[,,4:6], hl = Oudon$hl[4:6]) #catchments considered as ungauged
sim <- quick_transfr(obs, sim)
Run the code above in your browser using DataLab