ReadModflowBinary: Read MODFLOW Binary File

View source: R/ReadModflowBinary.R

ReadModflowBinaryR Documentation

Read MODFLOW Binary File

Description

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

Usage

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

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]])


USGS-R/inlmisc documentation built on Sept. 17, 2022, 2:38 a.m.