ts.center.buoyancy: Calculates the center of buoyancy for multiple temperature...

Description Usage Arguments Value References See Also Examples

View source: R/center.buoyancy.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  #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")
	

GLEON/rLakeAnalyzer documentation built on May 3, 2021, 1:32 p.m.