Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

layer.density

Returns the average density of a layer between two depths.


Description

This function calculates the average density of a layer of water between two depths.

Usage

layer.density(top, bottom, wtr, depths, bthA, bthD, sal = wtr * 0)

Arguments

top

Numeric value of the depth (m) of the top of the layer from the water surface

bottom

Numeric value of the depth (m) of the bottom of the layer from the water surface

wtr

Numeric vector of water temperature in degrees C

depths

Numeric vector of depths (m) corresponding to water temperature vector

bthA

Numeric vector of water body cross sectional area (m2) corresponding to bthD depths

bthD

Numeric vector of water body bathymetric depths (m) corresponding to areal bthA values

sal

Optional numeric vector of salinity in Practical Salinity Units corresponding to water temperature vector. If left blank, salinity is set to be zero

Value

Numeric value of average water density for bounded layer in kg/m^3

See Also

water.density

Examples

top     <- 2
bottom  <- 6
wtr     <- c(25.2,25.1,24.1,22.0,19.8,15.3,12.0,11.1)
depths  <- c(0,1,2,3,4,5,6,7) 
bthA    <- c(10000,8900,5000,3500,2000,1000,300,10)
bthD    <- c(0,1,2,3,4,5,6,7)
layer.density(top,bottom,wtr,depths,bthA,bthD)

rLakeAnalyzer

Lake Physics Tools

v1.11.4.1
GPL (>= 2)
Authors
Luke Winslow, Jordan Read, Richard Woolway, Jennifer Brentrup, Taylor Leach, Jake Zwart, Sam Albers, Doug Collinge
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.