# hypso_functions: Hypsographic Functions from Tabular Interpolation In rSALMO: Simulation of ecological lake models

## Description

The main function creates a function list object from a data table to allow interpolation of depths, areas and volume fractions of layers.

## Usage

 `1` ```hypso_functions(table) ```

## Arguments

 `table` hypsographic table (bathymetry) given as data frame with columns `level`, `area` and `volume`

## Value

a list of functions with the following elements (slots):

• `level(volume)` interpolates level from volume

• `volume(level)` interpolates volume from a given water level

• `area(level)` interpolates area from a given level

• `vh(level, zmixreal)` calculates hypolimnic volume from surface water level (m above ground) and mixing depth (zmixreal, thermocline in m below surface)

• `ve(level, zmixreal)` calculates epilimnic volume from surface water level and zmixreal

• `zmix(level, zmixreal)` calculates average mixing depth (zmix) from surface water level and zmixreal

• `zhm(level, zmixreal)` calculates average depth of bottom layer (hypolimnion and metalimnion)

• `sediment_area(level)` calculates sediment area for a series of water levels, where `level` shoudl be a vecor of water levels in ascending order

• `pelagic_ratio(level)` calculates the area ratio of the pelagic part (water) to the total area of layers. It is equal to 1 - sediment area fraction.

`hypso_bautzen`, an example of a hypsographic table
`areaFunction`, functions to create a hypsographic table for lakes with conical shape.
 ```1 2 3 4 5``` ```data(hypso_bautzen) # load data table hypso <- hypso_functions(hypso_bautzen) # create function object hypso\$volume(166) # volume at 166 m a.s.l. hypso\$sediment_area(c(160, 166)) # sediment area of hypo- and epilimnion ```