Skip to contents

Split a reach into a list of reaches

Usage

split_reach(reach, x_limits)

Arguments

reach

A ReachTxt object

x_limits

Chainage (i.e. abscissas along the reach) of splitting points

Value

A list of ReachTxt objects

Examples

# Create a 10km long trapezoidal uniform reach
profT <- list(
  B = 2,
  S = (6 - 2) / 2 / 2,
  ZF = 100,
  ZB = 100 + 2
)
min_reach <- create_uniform_reach_txt(abscissas = seq(0, 10000, 100),
                                      upstream_bed_elevation = 10 + 2000 * 0.002,
                                      slope = 0.002,
                                      section_type = "T",
                                      profile = profT)
# Split into reaches of 2000 m
reaches <- split_reach(min_reach, seq(0, 10000, 2000))