spec_head_from_slope: Calculate specified head elevations given geometry & slope...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/spec_head_from_slope.R

Description

Calculate specified head elevations given geometry & slope Assumes a single line.

Usage

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

Arguments

swdf

DataFrame/Geometry of node barycentric coordinates as returned by calc_stream_voronoi_weights

sp

integer, stress period of heads, used for column naming

slope

numeric, slope

initial_elev

streambed elevation at start of segment 1

Value

swdf DataFrame/Geometry with added seg1.head[sp] and seg1.head[sp] columns

Author(s)

Leland Scantlebury

See Also

stream_elev_from_slope

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#-- 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 <- spec_head_from_slope(swdf = swdf, sp = 1, slope = 0.0015, initial_elev = 50)

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