rmf_read_hed reads in a MODFLOW head file and returns it as an RMODFLOW hed object.

rmf_read_hed(
  file = {     cat("Please select head file ...\n")     file.choose() },
  dis = {     cat("Please select corresponding dis file ...\n")    
    rmf_read_dis(file.choose()) },
  huf = NULL,
  oc = NULL,
  bas = NULL,
  hdry = huf$hdry,
  binary = TRUE,
  precision = "single",
  timesteps = NULL
)

rmf_read_head(...)

rmf_read_fhd(...)

rmf_read_bhd(...)

Arguments

file

filename; typically '*.hed'

dis

dis object

huf

huf object; optional. Provide only if huf heads are being read. See details.

oc

oc object; optional. See details.

bas

bas object; optional. If supplied, is used to set the hnoflo values to NA.

hdry

numeric value as set by the flow package (bcf, lpf, huf or upw). If supplied, cells with this value are dry and their values are set to NA. Defaults to NULL (unless huf is supplied)

binary

logical; is the file binary?

precision

either 'single' or 'double'. Specifies the precision of the binary file.

timesteps

optional integer vector specifying which time steps to read. If -1 is specified, only the last time step is read. Defaults to NULL. See details.

Value

object of class hed and rmf_4d_array.

Details

When huf heads are to be read, a huf object should also be supplied. The final array will have NHUF layers instead of NLAY.

If no oc object is supplied, a rmf_array of dimensions NROW x NCOL x NLAY x sum(NSTP) is created and filled. Time steps for which no output is given are filled with NA. If a oc object is supplied, the dimensions of the returned array are NROW x NCOL x NLAY x STPS where STPS are timesteps for which output is saved. If the array is in ASCII format and no headers are present, a OC object must be supplied. In that case, it is assumed that the file being read only contains head values and the keyword XSECTION in the bas file is not present.

If the timesteps argument is supplied, it overwrites the use of the oc argument. For all array flow terms a rmf_array of dimensions NROW x NCOL x NLAY x length(timesteps) is created and filled.

The only use of the bas argument is to replace the hnoflo values in the final array with NA's.

Functions

  • rmf_read_head:

  • rmf_read_fhd: Compatible with default ModelMuse file extension

  • rmf_read_bhd: Compatible with default ModelMuse file extension