stream_elev_from_slope: Calculate streambed elevations given geometry & slope Assumes...

Description Usage Arguments Value Author(s) Examples

View source: R/stream_elev_from_slope.R

Description

Calculate streambed elevations given geometry & slope Assumes a single stream, with segments properly ordered.

Usage

1
stream_elev_from_slope(swdf, slope, initial_elev, order_by_index = F, sp = 1)

Arguments

swdf

DataFrame/Geometry of node barycentric coordinates as returned by calc_stream_voronoi_weights

slope

numeric, streambed slope

initial_elev

streambed elevation at start of segment 1

Value

swdf DataFrame/Geometry with added seg1.elev and seg2.elev columns

Author(s)

Leland Scantlebury

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#-- Read in shapefiles
str <- read_sf(system.file("extdata", "MehlandHill2010_stream.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "720_triangles.shp", package = "pbjr"))
vor <- read_sf(system.file("extdata", "720_voronoi.shp", package = "pbjr"))
str <- line_explode(str)

#-- Calculate barycentric weight DF
swdf <- calc_stream_voronoi_weights(stream = str, voronoi = vor, triangles = tri)

#-- Calculate distances
swdf <- stream_elev_from_slope(swdf = swdf, slope = 0.0015, initial_elev = 50)

#-- Calculate conductances
swdf$Conductance <- calc_conductance_modflow(swdf, k_streambed = 1,
                                             str_width = 1, thickness = 0.5)

scantle/pbjr documentation built on Dec. 22, 2021, 10:19 p.m.