Volume2Level: Function for linear interpolation given the relationship of...

Description Usage Arguments Author(s) Examples

View source: R/Volume2Level.R

Description

Given a relationship between two variables (e.g. volume and level), this function interpolates the corresponding second variable (e.g. level) for a known value of the first variable (e.g. volume). This function is suitable to represented e.g. the dynamics of water storage in a combined sewer overflow chamber.

Usage

1
Volume2Level(vol, lev2vol)

Arguments

vol

A numeric object that represents the know variable e.g. the volume in a storage chamber.

lev2vol

A list of two elements. The first element is a vector named "lev" that contains the interpolation steps of the first variable (e.g. level). The second element is a vector that contains the interpolation steps of the second variable (e.g. volume).

Author(s)

J.A. Torres-Matallana, G. Schutz

Examples

1
2
3
4
5
6
7
library(EmiStatR)

# definition of relationship level to volume
lev2vol <- list(lev = c(.06, 1.10, 1.30, 3.30), vol = c(0, 31, 45, 200))

interpolated_level <- Volume2Level(vol=c(0, 25, 41, 190, 220), lev2vol = lev2vol)
interpolated_level

EmiStatR documentation built on Sept. 28, 2021, 9:08 a.m.