ReadModflowBinary: Read MODFLOW Binary File

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ReadModflowBinary.R

Description

Read binary files output from MODFLOW-based models, the U.S. Geological Survey's three-dimensional finite-difference groundwater model.

Usage

1
2
3
4
5
6
ReadModflowBinary(
  path,
  data.type = c("array", "flow"),
  endian = c("little", "big"),
  rm.totim.0 = FALSE
)

Arguments

path

'character' string. Path to a MODFLOW binary file.

data.type

'character' string. Description of how the data were saved. Specify "array" for array data (such as hydraulic heads or drawdowns) and "flow" for cell-by-cell flow data (budget data).

endian

'character' string. Endian-ness (or byte-order) of the binary file.

rm.totim.0

'logical' flag. Whether data associated with the stress period at time zero should be removed.

Value

A 'list' of length equal to the number of times data were written to the binary file. List components are as follows:

d

matrix of values. The matrix dimensions typically coincide with the horizontal model grid. The exception is for flow data (data.type = "flow") when the cell-by-cell budget file is saved using the "COMPACT BUDGET" output option; for this case, matrix columns are: cell index ("icell"), model-grid layer ("layer"), model-grid row ("row"), model-grid column ("column"), cell-by-cell flow ("flow"), and any auxiliary variables saved using the "AUXILIARY" output option.

kstp

time step

kper

stress period

desc

description of data-type, such as "wells".

layer

model-grid layer

delt

time-step size

pertim

elapsed time in the current stress period.

totim

total elapsed time

The layer component (layer) and time components (delt, pertim, totim) are only available for flow data when the cell-by-cell budget file is saved using the "COMPACT BUDGET" output option.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

See Also

SummariseBudget

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
path <- system.file("extdata", "ex.hds", package = "inlmisc")
heads <- ReadModflowBinary(path, "array")
image(heads[[1]]$d)
str(heads[[1]])

path <- system.file("extdata", "ex.bud", package = "inlmisc")
budget <- ReadModflowBinary(path, "flow")
image(budget[[1]]$d)
str(budget[[1]])
str(budget[[11]])

inlmisc documentation built on Jan. 25, 2022, 1:14 a.m.