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

ts.center.buoyancy

Calculates the center of buoyancy for multiple temperature profiles.


Description

Function for simplifying the calculation of the center of buoyancy. Can usually be called directly on data loaded directly using load.ts and load.bathy.

Usage

ts.center.buoyancy(wtr, na.rm = FALSE)

Arguments

wtr

A data frame of water temperatures (in Celsius). Loaded using load.ts

na.rm

Boolean indicated if step-by-step removal of NA's should be tried. If false, a timestep with any NA values will return an NA value. If true, best effort will be made to calculate indices despite NA values.

Value

Returns a data frame with the timeseries of the center of buoyancy frequency. Includes a ‘datetime’ column.

References

Imberger, J., Patterson, J.C., 1990. Physical limnology. Advances in Applied Mechanics 27, 353-370.

See Also

center.buoyancy, load.bathy, load.ts

Examples

#Get the path for the package example file included
  wtr.path <- system.file('extdata', 'Sparkling.daily.wtr', package="rLakeAnalyzer")
	
  #Load data for example lake, Sparkilng Lake, Wisconsin.
  sp.wtr = load.ts(wtr.path)
	 
  #calculate and plot the thermocline depth
  t.d = ts.thermo.depth(sp.wtr)
  
  center.N2 = ts.center.buoyancy(sp.wtr)
	
  plot(center.N2, type='l', ylab='Depth (m)', xlab='Date', ylim=c(19,0), lwd = 1.5)
  lines(t.d, type='l', col='red', lwd = 1.5)
  legend(x = t.d[3,1], y = .25,
     c('center of buoyancy','thermocline depth'),
     lty=c(1,1),
     lwd=c(1.5,1.5),col=c("black","red"), bty = "n")

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.