Learn R Programming

hydReng (version 0.1.0)

mean_roughness: Mean Roughness

Description

Calculates the mean roughness of a CSarbitrary object for a given set of water levels, based on Einstein (1934).

Usage

mean_roughness(object, h)

Value

A numeric vector representing the mean roughness for the given water levels.

Arguments

object

A CSarbitrary object.

h

A numeric vector of water levels [m].

Examples

Run this code
# Example usage:
x <- c(0, 4, 9, 13)
z <- c(2, 0, 0, 2)
cs <- CSarbitrary(x = x, z = z, xb_l = 4, xb_r = 9, kSt_B = 35,
                  kSt_l = 45, kSt_r = 45)
h_levels <- c(1, 2)  # water levels
mean_roughness(cs, h_levels)

Run the code above in your browser using DataLab