mld: Mixing Layer Depth

Description Usage Arguments Details Value References Examples

View source: R/rrexplore.r

Description

Identification of the mixing layer depth (e.g. thermocline, pycnocline) using a modified version of the Maximum Angle Method.

Usage

1
2
mld(z, x = NULL, np = 2, min.range = 0, max.z = NULL,
  return.index = FALSE)

Arguments

z

Vector of depths, or 2-column dataframe containing depths in first column and variable of interest (e.g. temperature, salinity) in second column.

x

Vector containing variable of interest (e.g. temperature, salinity) of same length as z.

np

Number of points to use in linear regressions (see 'details').

min.range

The minimum range in the value of x in order for a mixing layer to be detectable.

max.z

Maximum value of z to use when searching for mixing layer depth.

return.index

If TRUE, return the index of z corresponding to the mixing layer depth. Otherwise, return the depth.

Details

The Maximum Angle Method is modified to better handle the identification of the mixing layer depth when the surface layer is poorly-mixed and to provide some flexibility in the linear regression, but may be less stable as a result. The modifications force the dual linear regressions to share the last/first data point and allow the user to specify the number of points used in the regressions.

Value

either the mixing layer depth or the element index of z associated with said depth, depending on the value of return.type.

References

Chu, Peter C., and Chenwu Fan. "Maximum angle method for determining mixed layer depth from seaglider data." Journal of oceanography 67.2 (2011): 219-230.

Examples

1
2
3
4
5
6
data(ctd)
zt = subset(ctd, date == date[1] & dist == dist[1])[c("depth", "ta")] 
mld(zt)
mld(zt, return.index = TRUE)

#' @seealso \code{\link{blt}}

mkoohafkan/rremat documentation built on July 3, 2021, 12:06 p.m.