reduceGRiwrm: Reduce the size of a GRiwrm by selecting the subset of nodes...

View source: R/utils.GRiwrm.R

reduceGRiwrmR Documentation

Reduce the size of a GRiwrm by selecting the subset of nodes corresponding to a downstream node

Description

Reduce the size of a GRiwrm by selecting the subset of nodes corresponding to a downstream node

Usage

reduceGRiwrm(griwrm, down_node, check = FALSE)

Arguments

griwrm

A GRiwrm object (See CreateGRiwrm)

down_node

The ID of the downstream node of the reduced GRiwrm

check

logical Check the consistency of the reduced GRiwrm

Value

A GRiwrm object only containing nodes located upstream the given downstream node

Examples

data(Severn)
nodes <- Severn$BasinsInfo
nodes$model <- "RunModel_GR4J"
str(nodes)
# Mismatch column names are renamed to stick with GRiwrm requirements
rename_columns <- list(id = "gauge_id",
                       down = "downstream_id",
                       length = "distance_downstream")
griwrm_severn <- CreateGRiwrm(nodes, rename_columns)
griwrm_severn
# Network diagram with upstream basin nodes in blue, intermediate sub-basin in green
plot(griwrm_severn)
plot(reduceGRiwrm(griwrm_severn, "54032"))


inrae/airGRiwrm documentation built on Sept. 27, 2024, 6:08 p.m.