set_routing.catchment: Routing of catchment outflow setting

View source: R/catchment.R

set_routingR Documentation

Routing of catchment outflow setting

Description

Sets method and parameters used for routing for the catchment.

Usage

set_routing(reser, method, settings)

## S3 method for class 'catchment'
set_routing(catchment, ...)

Arguments

catchment

A catchment object.

...

Routing method and settings as passed to the set_routing.wateres function.

Details

The catchment routing is implemented as a routing for the outflow of the catchment, i.e. at its outlet (which is represented as a reservoir with zero volume in the catchments).

Value

A catchment object with the routing settings.

Examples

data_catch = data.frame(DTM = seq(as.Date("1982-11-01"), length.out = 7, by = "day"), PET = rep(0.5, 7), R = rep(24 * 3.6, 7), P = rep(1, 7))
res_data = data.frame(
    storage = c(1e7, 1e7, 1e7), area = c(1e4, 1e4, 1e4), part = c(0.25, 0.25, 0.5), branch_id = c("main", "lateral", "lateral"), id = c("M1", "L1", "L2"))
branches = list(main = list(down_id = NA), lateral = list(down_id = "main", connect_to_part = 0.8))
catch = as.catchment(id = "C1", down_id = "C2", data = data_catch, area = 100, res_data = res_data, branches = branches, main_branch = "main")
catch = set_routing(catch, "lag", list(lag_time = 2880))

tgmwri/wateres documentation built on Feb. 13, 2024, 10:25 p.m.