estThermo: Estimate Average Thermocline Depth

View source: R/estThermo.R

estThermoR Documentation

Estimate Average Thermocline Depth

Description

Estimate average thermocline depth across multiple sites and dates.

Usage

estThermo(data, site, date, depth, temp, combine = "all", type = "midpoint")

Arguments

data

data frame of water column temperature profiles

site

character giving the name of the site column

date

character giving the name of the date column

depth

character giving the name of the depth column

temp

character giving the name of the temp column

combine

character indicating whether to average across sites ("sites"), dates ("dates"), sites and dates ("all"), or not at all ("none"), default = "all". When combine = "none", each site/date combination is returned individually with no averaging.

type

character indicating whether to estimate a single thermocline midpoint depth ("midpoint") or the upper and lower depths bounding the metalimnion ("top_bottom"), default = "midpoint". "midpoint" wraps rLakeAnalyzer::thermo.depth(); "top_bottom" wraps rLakeAnalyzer::meta.depths().

Value

a data frame. When type = "midpoint": thermocline midpoint depths, standard deviations, and n (combine = "sites", "dates", or "all"), or one row per site/date combination giving that profile's midpoint depth (combine = "none"). When type = "top_bottom": upper and lower metalimnion boundary depths, standard deviations, and n (combine = "sites", "dates", or "all"), or one row per site/date combination giving that profile's upper and lower boundary depths (combine = "none").

Author(s)

Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming

Examples

# load test profile data
data <-  read.csv(system.file("extdata", "example_profile_data.csv", package = 'rLakeHabitat'))
data$date <- base::as.Date(data$date)
#run function
estThermo(data = data, site = "site", date = "date",
depth = "depth", temp = "temp", combine = "all")
#or, to get each site/date profile's thermocline depth individually:
estThermo(data = data, site = "site", date = "date",
depth = "depth", temp = "temp", combine = "none")
#or, to estimate upper and lower metalimnion boundaries instead of a single midpoint:
estThermo(data = data, site = "site", date = "date",
depth = "depth", temp = "temp", combine = "none", type = "top_bottom")

rLakeHabitat documentation built on July 30, 2026, 5:11 p.m.