get_metab_data: Get a data.frame of metabolism input data

View source: R/get_metab_data.R

get_metab_dataR Documentation

Get a data.frame of metabolism input data

Description

Quick access to metabolism input data (data arg only)

Usage

get_metab_data(site, sitetime = NA, doobs = NA, dosat = NA, depth = NA,
  wtr = NA, par = NA, disch = NULL, veloc = NULL, sitedate = NULL,
  doinit = NULL, gpp = NULL, er = NULL, K600 = NULL, K600lwr = NULL,
  K600upr = NULL, gppinit = NULL, erinit = NULL, K600init = NULL,
  dischdaily = NULL, velocdaily = NULL, start_date = NA, end_date = NA,
  tag = "0.0.0", strategy = "get_metab_data", date = Sys.time(),
  model = "metab_mle", model_args = "list()", simplify = TRUE,
  verbose = TRUE)

Arguments

site

site names

sitetime

Data Source for mean solar time. See Data Source Format below.

doobs

Data Source for dissolved oxygen concentrations. See Data Source Format below.

dosat

Data Source for dissolved oxygen saturation concentrations. See Data Source Format below.

depth

Data Source for mean stream depth. See Data Source Format below.

wtr

Data Source for water temperature. See Data Source Format below.

par

Data Source for light (photosynthetically available radiation, PAR). See Data Source Format below.

disch

Data Source for unit-value stream discharge, for use in identifying daily priors or fixed values for K600. See Data Source Format below.

veloc

Data Source for unit-value flow velocity, for use in identifying daily priors or fixed values for K600. See Data Source Format below.

sitedate

Data Source for the dates of interest. See Data Source Format below.

doinit

Data Source for the first DO observation on each date to model, for use in data simulation. See Data Source Format below.

gpp

Data Source for daily gross primary productivity rates for use in data simulation. See Data Source Format below.

er

Data Source for ecosystem respiration rates for use in data simulation. See Data Source Format below.

K600

Data Source for reaeration rates for use in data simulation. See Data Source Format below.

K600lwr

Data Source for lower bound on reaeration rates for use in data simulation. See Data Source Format below.

K600upr

Data Source for upper bound on reaeration rates for use in data simulation. See Data Source Format below.

gppinit

Data Source for initial values of daily gross primary productivity rates for use in likelihood maximization. See Data Source Format below.

erinit

Data Source for initial values of ecosystem respiration rates for use in likelihood maximization. See Data Source Format below.

K600init

Data Source for initial values of reaeration rates for use in likelihood maximization. See Data Source Format below.

dischdaily

Data Source for daily mean stream discharge, for use in identifying daily priors or fixed values for K600. See Data Source Format below.

velocdaily

Data Source for daily mean flow velocity, for use in identifying daily priors or fixed values for K600. See Data Source Format below.

start_date

NA or datetime, to be coerced with as.POSIXct(start_date, tz="UTC"), at which to start the data passed to the metab model

end_date

NA or datetime, to be coerced with as.POSIXct(end_date, tz="UTC"), at which to end the data passed to the metab model

tag

character of form "1.0.2" that uniquely identifies this set of modeling runs.

strategy

character, or vector of length sites, describing this set of modeling runs in concise English.

date

POSIXct indicating the date of config construction. It is strongly recommended to use the default.

model

character. the name of the metabolism model to construct

model_args

character, in R language, specifying any arguments to pass to the model function

simplify

logical. If there's only one data.frame to retrieve, remove it from the enclosing list?

verbose

logical. give progress messages?

Value

a list of data.frames, or if simplify=TRUE and there's only one data.frame, a single data.frame of input data

Examples

## Not run: 
md <- get_metab_data('nwis_08062500')
md <- get_metab_data('styx_004001')
login_sb()
md <- get_metab_data('styx_004001', doobs=choose_data_source(
  'doobs','styx_004001','sim',type='pred',src='160411 0.0.18'))

## End(Not run)

USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.