stkmod: Get RMSE of stick model for density stratification

Description Usage Arguments Details Value

Description

Get RMSE of stick model for density stratification

Usage

1
stkmod(strt, profin, est = FALSE)

Arguments

strt

numeric for depth of mixing layer

profin

data.frame of a single depth profile

est

logical if model estimates are returned instead of RMSE

Details

The stick model is fit to a plot of seawater density by depth to estimate the depth of the mixing layer. The model assumes mean density at depths above the value for strt and a linear model at depths deeper than strt. The model is joined at the mean density value above strt and the regression fit through the same value at strt. The function returns RMSE of the fit for single interval optimization with findstk . The profin data frame must have two columns for depth (binmd) and seawater density (sig).

Value

The RMSE value if est = FALSE, otherwise a two-element list of x and y values corresponding to the beginning, join, and ending values for depth and density for the model.


fawda123/EstuaryMetabolism documentation built on May 16, 2019, 10:57 a.m.