rmfi_parse_array: Get an array specified by a control record from the text...

View source: R/internals.R

rmfi_parse_arrayR Documentation

Get an array specified by a control record from the text lines analyzed in an RMODFLOW read.* function

Description

Get an array specified by a control record from the text lines analyzed in an RMODFLOW read.* function

Usage

rmfi_parse_array(
  remaining_lines,
  nrow,
  ncol,
  nlay,
  ndim,
  fmt = NULL,
  skip_header = FALSE,
  nam = NULL,
  precision = "single",
  file = NULL,
  integer = FALSE,
  ...
)

Arguments

remaining_lines

lines to read the array from

nrow

number of rows in the array

ncol

number of columns in the array

nlay

number of layers in the array that should be read

ndim

dimensions of the array to read; either 1, 2 or 3. Denotes the if the returned array should be 1D, 2D or 3D.

fmt

optional; character with a proper FORTRAN format enclosed in parentheses. Only used when skip_header = TRUE and a fixed-format array needs to be read, i.e. output arrays.

skip_header

optional; should the control record be skipped

nam

a RMODFLOW nam object. Required when reading fixed-format or EXTERNAL arrays

precision

character: either 'single' (default) or 'double'. Denotes the precision of binary files

file

pathname to the MODFLOW input file which is currently being read. Required when reading fixed-format or OPEN/CLOSE arrays

integer

logical; does the binary array hold integer values. Might not work optimally.

...

ignored

Value

A list containing the array and the remaining text of the MODFLOW input file


rogiersbart/RMODFLOW documentation built on Jan. 14, 2023, 4:21 a.m.