Learn R Programming

LakeMetabolizer (version 1.5.5)

k600.2.kGAS: Returns the gas exchange velocity for gas of interest w/ no unit conversions

Description

Returns the gas exchange velocity for gas of interest w/ no unit conversions

Usage

k600.2.kGAS.base(k600,temperature,gas="O2")

k600.2.kGAS(ts.data, gas="O2")

Value

Numeric value of gas exchange velocity for gas

Arguments

k600

k600 as vector array of numbers or single number

temperature

Water temperature (deg C) as vector array of numbers or single number

gas

gas for conversion, as string (e.g., 'CO2' or 'O2')

ts.data

Object of class data.frame with named columns datetime and k600 and wtr (water temp in deg C). Other columns are ignored

Author

Jordan S. Read

See Also

k.read and k.read.base for functions that calculate k600 estimates

Examples

Run this code
 ## single example
kO2 <- k600.2.kGAS.base(k600=2.4,temperature=20.4,gas='O2')

## Timeseries example
#load data
data.path = system.file('extdata', package="LakeMetabolizer")
sp.data = load.all.data('sparkling', data.path)
ts.data = sp.data$data #pull out just the timeseries data


#calculate U10 and add it back onto the original 
u10 = wind.scale(ts.data)
ts.data = rmv.vars(ts.data, 'wnd', ignore.offset=TRUE) #drop old wind speed column
ts.data = merge(ts.data, u10)                          #merge new u10 into big dataset  

k600 = k.cole(ts.data)
ts.data = merge(k600, ts.data)

k.gas = k600.2.kGAS(ts.data, 'O2')

Run the code above in your browser using DataLab