ts.layer.temperature: Calculate volume-weighted average water temperature across a...

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
ts.layer.temperature(wtr, top, bottom, bathy, na.rm = FALSE)

Arguments

wtr

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

top

Either a single numeric depth value to be used across the entire timeseries, or a vector of same length as the timeseries (e.g., nrow(wtr)). This is useful when calculating a time-varying layer average, like average epilimnion temperature.

bottom

Either a single numeric depth value to be used across the entire timeseries, or a vector of same length as the timeseries (e.g., nrow(wtr)). This is useful when calculating a time-varying layer average, like average epilimnion temperature.

bathy

A data frame containing hypsometric data. Loaded using load.bathy

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 average layer temperature. Includes ‘datetime’ and ‘layer.temp’ columns.

See Also

layer.temperature

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	#Get the path for the package example file included
	wtr.path <- system.file('extdata', 'Sparkling.daily.wtr', package="rLakeAnalyzer")
	bathy.path <- system.file('extdata', 'Sparkling.bth', package="rLakeAnalyzer")
	
	#Load data for example lake, Sparkilng lake, in Wisconsin.
	sp.wtr = load.ts(wtr.path)
	sp.bathy = load.bathy(bathy.path)
	
	
    l.t = ts.layer.temperature(sp.wtr, 0, 18, sp.bathy)
	plot(l.t$datetime, l.t$layer.temp, type='l', 
        ylab='Volumetrically averaged lake temperature', xlab='Date')
	

rLakeAnalyzer documentation built on June 10, 2019, 1:02 a.m.