wetPerim: Computes the wetted perimeter of a stream from depth and...

View source: R/wetPerim.R

wetPerimR Documentation

Computes the wetted perimeter of a stream from depth and distance measurements.

Description

Computes the wetted perimeter of a stream from depth and distance measurements.

Usage

wetPerim(distance, depth)

## S3 method for class 'wetPerim'
summary(object, detail = TRUE, ...)

## S3 method for class 'wetPerim'
plot(x, pch = 19, xlab = "Distance (ft)", ylab = "Depth (ft)", ...)

Arguments

distance

A vector of distance measurements at intervals across the cross section.

depth

A vector of depth measurements at intervals across the cross-section.

object

An object returned from discharge.

detail

A logical indicating whether the details of the discharge calculations should be shown (=TRUE) or not.

...

Other arguments to be passed to the plot function.

x

An object returned from discharge.

pch

The plotting character to be used for the depth profile. See par.

xlab

A string for labeling the x-axis.

ylab

A string for labeling the y-axis.

Value

wetPerim produces a list with a data frame of the original data, a vector of individual perimeter values, and the total perimeter. plot method produce a plot demonstrating the calculations. summary returns the total wetted perimeter and detailed intermediate calculations if asked for.

Examples

dist1 <- c(seq(0,22,2),24.7)
dep1 <- c(0,.9,1.1,1.1,1.1,.9,.9,.9,.9,.9,.9,.7,0)
vel1 <- c(0,1.01,1.07,1.22,1.22,1.36,1.28,1.38,1.29,0.88,0.52,0,0)
ex1w <- wetPerim(dist1,dep1)
summary(ex1w)
plot(ex1w)

dist2 <- c(seq(0,18,2),19.7)
dep2 <- c(0,1.2,1.5,1.4,1.4,1.4,1.5,1.7,2,1.5,0)
vel2 <- c(0,.53,.76,.95,.90,.98,1.01,.9,.9,0,.0)
ex2w <- wetPerim(dist2,dep2)
summary(ex2w)
plot(ex2w)


droglenc/FSAmisc documentation built on Jan. 8, 2023, 12:59 a.m.