stage_styx_site: Generate a list of files to post as a styx site

View source: R/stage_styx_site.R

stage_styx_siteR Documentation

Generate a list of files to post as a styx site

Description

A styx site, named after the famous lotic barrier between life and non-life, Earth and the Underworld, is a repository for simulated metabolism data.

Usage

stage_styx_site(site = "styx_000000", basedon = "nwis_07239450",
  times = c("2012-05-14 21:00:00", "2012-05-16 07:00:00"), depth = u(0.2,
  "m"), day_start = -1.5, day_end = 30, dates = NA,
  doinit = u(as.numeric(NA), "mgO2 L^-1"), gpp = u(as.numeric(NA),
  "gO2 m^-2 d^-1"), er = u(as.numeric(NA), "gO2 m^-2 d^-1"),
  K600 = u(as.numeric(NA), "d^-1"), info = NA, verbose = TRUE)

Arguments

site

a single styx site ID for which to generate data

basedon

an NWIS or other site ID from which to pull the site coordinates, elevation, and water temperature data

times

the starting and ending date-times by which to bound the STYX data. Give these as character strings in the Y-m-d H:M:S format (or just Y-m-d) in local solar mean time.

depth

unitted numeric mean stream depth in m

day_start

the time (as numeric hours, possibly negative) relative to each date from which to collect dates and possibly daily doinit (DO.mod.1) values

day_end

the time (as numeric hours, possibly >24) relative to each date from which to collect dates

dates

either a vector of Dates, to be used as-is, or a vector of character strings in Y-m-d form to be interpreted as dates. If supplied as character AND length 2, will be converted to Date and turned into a sequence of consecutive Dates

doinit

optional. If missing or NULL, and if day_start is specified, doinit values will be pulled from the doobs data of the basedon site at the time specified by day_start. If doinit is specified, it should be a unitted numeric vector of doinit values (values of DO.obs on whcih to start each day's simulated DO data, asusming these values are passed to a metab_sim model).

gpp

a unitted vector of daily GPPs to store with this site

er

a unittedvector of daily ERs to store with this site

K600

a unitted vector of daily K600s to store with this site

info

length-1 character string description of the site, how it differs from other Styx sites, etc., to be included in the styx metadata

verbose

logical. provide status messages?

Examples

## Not run: 
x <- stage_styx_site(dates=NA, gpp=unitted::u(c(4,3,6), "g m^-2 d^-1"), 
  er=unitted::u(-10, "g m^-2 d^-1"), K600=unitted::u(15, "d^-1"), verbose=FALSE)
head(read_ts(x$wtr))
read_ts(x$K600)

## End(Not run)

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