rmt_create_tob: Create a 'RMT3DMS' tob object

Description Usage Arguments Value See Also Examples

View source: R/package-tob.R

Description

rmt_create_tob creates an RMT3DMS tob object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
rmt_create_tob(
  locations = NULL,
  time_series = NULL,
  btn,
  outnam = "output",
  save_binary = FALSE,
  cscale = 1,
  ioutcobs = TRUE,
  iconclog = FALSE,
  iconcintp = TRUE,
  mlayw = rmt_create_array(1, dim = c(btn$nrow, btn$ncol, btn$nlay)),
  fscale = 1,
  ioutflux = TRUE,
  fluxobs = NULL,
  fluxcells = NULL,
  unique_obsnam = FALSE,
  prj = RMODFLOW::rmf_get_prj(btn),
  inconcobs = 61,
  influxobs = 62,
  insaveobs = 63
)

Arguments

locations

data.frame or sf POINT object with the name, x and y coordinates (if data.frame), and top and bottom of the monitoring well filter

time_series

data.frame with the name of the monitoring well filter, icomp, weight and the observation time and concentration

btn

RMT3DMS btn object

outnam

character specifying the basename of the output files. Defaults to 'output'.

save_binary

logical specifying if the calculated concentrations and mass fluxes should be saved to an unformatted output file outnam.PST. Defaults to FALSE.

cscale

scaling factor for the observed concentrations. Defaults to 1.

ioutcobs

logical specifying if the residual errors between calculated and observed concentrations should be written to the output file. Defaults to TRUE.

iconclog

logical specifying if the calculated and observed concentrations should be converted to the common logarithm (log10) before computing statistics. Defaults to FALSE.

iconcintp

logical indicating if the calculated concentrations at observation locations should be interpolated (bilinear) from neighboring nodal points. Defaults to TRUE.

mlayw

3d array containing weights for the proportioning of multilayer concentration observations. Defaults to 1 for all cells.

fscale

scaling factor for the observed mass fluxes. Defaults to 1.

ioutflux

logical indicating if the residual errors between calculated and observed mass fluxes should be written to the output file. Defaults to TRUE.

fluxobs

data.frame with name, icomp, time, weight, flux, group & iss columns. The group specifies the FluxGroup which the observation is part of. iss specifies the sink/source type and should be unique for each group.

fluxcells

data.frame with k, i, j, factor and group columns. The group specifies the FluxGroup which the observation is part of and is used to link to corresponding groups in fluxobs.

unique_obsnam

logical; should an ID number be added to obsnam for filters with concentration observations at different times prefixed with an underscore? Defaults to FALSE.

prj

RMODFLOW prj object; provide if coordinates in locations are real world coordinates

inconcobs

integer specifying the unit number to save the OCN output file to when locations & time_series are defined. Defaults to 61.

influxobs

integer specifying the unit number to save the MFX output file to when fluxobs & fluxcells are defined. Defaults to 62.

insaveobs

integer specifying the unit number to save the binary PST output file to when locations & time_series and/or fluxobs & fluxcells are defined and when save_binary = TRUE. Defaults to 63.

The locations data.frame must have columns named name, x, y, top, bottom. Names should be unique. The time_series data.frame must have columns named name, icomp, weight, time, concentration.

The fluxobs data.frame must have columns named name, icomp, weight, time, flux, group, iss. The fluxcells data.frame must have columns named k, i, j, factor, group.

Value

Object of class tob

See Also

rmt_read_tob, rmt_write_tob

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
btn <- rmt_create_btn()

locations <- data.frame(x = c(766, 123), y = c(880, 245), top = -5, bottom = c(-6, -16), name = c('well.a', 'well.b'))
time_series <- data.frame(time = c(1, 0.2, 1), icomp = 1, weight = 1, name = c('well.a', 'well.b', 'well.b'), concentration = c(25, 30, 35))


fluxobs <- data.frame(name = c('chd', 'riv', 'riv'), icomp = 1, time = c(-1, 0.5, 1),  weight = 1,
                      flux = c(500, -22.5, -33.2), group = c(1, 2, 2), iss = c(1, 4, 4))
fluxcells <- data.frame(k = 1, i = c(1, 10, 10, 10, 10), j = c(1, 7, 8, 9, 10),
                        factor = 1, group = c(1, 2, 2, 2, 2))

rmt_create_tob(locations, time_series, btn, fluxobs = fluxobs, fluxcells = fluxcells, unique_obsnam = TRUE)

rogiersbart/RMT3DMS documentation built on Oct. 16, 2021, 9:45 a.m.