metab.ols: Metabolism model based on a ordinary least squares parameter...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function runs the ordinary least squares metabolism model on the supplied gas concentration and other supporting data. This is a common approach that allows for the concurrent estimation of metabolism paramters from a timeseries.

Usage

1
metab.ols(do.obs, do.sat, k.gas, z.mix, irr, wtr, ...)

Arguments

do.obs

Vector of dissolved oxygen concentration observations, mg L^-1

do.sat

Vector of dissolved oxygen saturation values based on water temperature. Calculate using o2.at.sat

k.gas

Vector of kGAS values calculated from any of the gas flux models (e.g., k.cole) and converted to kGAS using k600.2.kGAS

z.mix

Vector of mixed-layer depths in meters. To calculate, see ts.meta.depths

irr

Vector of photosynthetically active radiation in micro mols / m^2 / s

wtr

Vector of water temperatures in degrees C. Used in scaling respiration with temperature

...

additional arguments; currently "datetime" is the only recognized argument passed through ...

Value

A data.frame with columns corresponding to components of metabolism

GPP

numeric estimate of Gross Primary Production, mg O2 / L / d

R

numeric estimate of Respiration, mg O2 / L / d

NEP

numeric estimate of Net Ecosystem production, mg O2 / L / d

Author(s)

Luke A Winslow, Ryan Batt, GLEON Fellows

See Also

metab, metab.bookkeep, metab.mle, metab.kalman, metab.bayesian,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(rLakeAnalyzer)
doobs = load.ts(system.file('extdata', 
                           'sparkling.doobs', package="LakeMetabolizer"))
wtr = load.ts(system.file('extdata', 
                         'sparkling.wtr', package="LakeMetabolizer"))
wnd = load.ts(system.file('extdata', 
                         'sparkling.wnd', package="LakeMetabolizer"))
irr = load.ts(system.file('extdata', 
                         'sparkling.par', package="LakeMetabolizer"))

#Subset a day
mod.date = as.POSIXct('2009-07-08')
doobs = doobs[trunc(doobs$datetime, 'day') == mod.date, ]
wtr = wtr[trunc(wtr$datetime, 'day') == mod.date, ]
wnd = wnd[trunc(wnd$datetime, 'day') == mod.date, ]
irr = irr[trunc(irr$datetime, 'day') == mod.date, ]
z.mix = ts.thermo.depth(wtr)

k600 = k.cole.base(wnd[,2])
k.gas = k600.2.kGAS.base(k600, wtr[,3], 'O2')
do.sat = o2.at.sat.base(wtr[,3], altitude=300)

metab.ols(doobs[,2], do.sat, k.gas, z.mix[,2], irr[,2], wtr[,3])

clairervh/LakeMetabolizer documentation built on May 12, 2019, 2:05 p.m.