rmf_read_ddn reads in a MODFLOW drawdown file and returns it as an RMODFLOW ddn object.

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

rmf_read_drawdown(...)

Arguments

file

filename; typically '*.ddn'

dis

dis object

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

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 ddn and rmf_4d_array

Details

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.