get_metab_prep: Get a data.frame of metabolism input data

View source: R/get_metab_prep.R

get_metab_prepR Documentation

Get a data.frame of metabolism input data

Description

Quick-get function for manual getting of metabolism data

Usage

get_metab_prep(site, out = c("data", "data_daily", "info"), 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_config = TRUE, simplify_out = TRUE,
  verbose = TRUE)

Arguments

site

site names

out

character vector of one or more elements of c('data','data_daily','info') to return

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_config

logical. If the implied config file has only one row, should the list be reduced to one element?

simplify_out

If out has only one element, should the list of lists be reduced to a list of data.frames?

verbose

logical. give progress messages?

Examples

## Not run: 
md <- get_metab_prep('nwis_08062500') # list of $data, $data_daily, $info
md <- get_metab_prep('nwis_08062500', simplify_config=FALSE) # list of lists
md <- get_metab_prep('nwis_08062500', out='data') # single data.frame
md <- get_metab_prep(c('nwis_08062500','nwis_01646500'), out='data') # list of data.frames
md <- get_metab_prep('nwis_08062500', sitedate=NA, K600=NA, 
  start_date="2014-03-10 04:00:00", end_date="2014-03-11 04:00:00") # short data.frames
md <- get_metab_prep('nwis_08062500', sitetime=NULL, doobs=NULL, dosat=NULL, depth=NULL, 
  wtr=NULL, par=NULL, sitedate=NA, K600='estBest', dischdaily=NA, model='metab_Kmodel')

## End(Not run)

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