metab_night: Nighttime regression for K estimation

View source: R/metab_night.R

metab_nightR Documentation

Nighttime regression for K estimation

Description

Fits a model to estimate K from nighttime input data on DO, temperature, light, etc. The default day start & end are 12 noon on the preceding to present day; the algorithm then filters the data to just those time points for which light is very low. Discharge is only used, if at all, to identify and exclude days with any negative discharge.

Usage

metab_night(
  specs = specs(mm_name("night")),
  data = mm_data(solar.time, DO.obs, DO.sat, depth, temp.water, light, discharge,
    optional = "discharge"),
  data_daily = mm_data(NULL),
  info = NULL
)

Arguments

specs

a list of model specifications and parameters for a model. Although this may be specified manually (it's just a list), it is easier and safer to use specs to generate the list, because the set of required parameters and their defaults depends on the model given in the model_name argument to specs. The help file for specs lists the necessary parameters, describes them in detail, and gives default values.

data

data.frame (not a tbl_df) of input data at the temporal resolution of raw observations (unit-value). Columns must have the same names, units, and format as the default. The solar.time column must also have a timezone code ('tzone' attribute) of 'UTC'. See the 'Formatting data' section below for a full description.

data_daily

data.frame containing inputs with a daily timestep. See the 'Formatting data_daily' section below for a full description.

info

any information, in any format, that you would like to store within the metab_model object

Value

A metab_night object containing the fitted model. This object can be inspected with the functions in the metab_model_interface.

Author(s)

Alison Appling, Maite Arroita, Bob Hall

See Also

Other metab_model: metab_Kmodel, metab_bayes, metab_mle, metab_sim

Examples

dat <- data_metab('3', day_start=12, day_end=35)
mm <- metab_night(data=dat)
predict_metab(mm)
## Not run: 
plot_DO_preds(predict_DO(mm))

## End(Not run)

USGS-R/streamMetabolizer documentation built on Aug. 15, 2023, 7:50 a.m.