Convert a parameter defined on the HUF grid to the numerical grid

rmf_convert_huf_to_grid(
  huf,
  dis,
  parameters = huf$parameters,
  values = NULL,
  grid = "dis",
  mask = rmf_create_array(1, dim = c(dis$nrow, dis$ncol, dis$nlay)),
  type = ifelse(partyp == "VK", "harmonic", "arithmetic"),
  partyp = "HK",
  pval = NULL
)

Arguments

huf

huf object

dis

dis object

parameters

a list of huf parameters. Defaults to the parameters of the supplied huf object.

values

vector of parameter values of length nhuf, in the order of hgunam; overwrites parameters. All values should typically represent the same parameter type.

grid

target grid; either 'dis' (default) or 'huf'. When 'huf', no averaging is performed

mask

masking 3d array for averaging, typically the ibound array, to speed up grid conversion; defaults to including all cells

type

type of averaging that should be performed when grid == 'dis'; either arithmetic (default), harmonic or geometric

partyp

which parameter type to convert; used to subset parameters. Possible values are 'HK' (default), 'HANI', 'VK', 'VANI', 'SS', 'SY', 'SYTP'. Only used with parameters. Defaults to 'arithmetic' expect when partyp = 'VK' ('harmonic').

pval

optional RMODFLOW pval object. Used to overwrite the parval attributes if parameters is supplied

Value

rmf_3d_array with the parameter values. Dimensions are dis$nrow, dis$ncol, dis$nlay when grid == 'dis' or dis$nrow, dis$ncol, huf$nhuf when grid == 'huf'

Details

Either parameters or values should be supplied. The former is used for more complex parametrizations including multiplier and/or zone arrays. The latter is used when a single parameter value of for each unit is sufficient. When values is used, all values typically represent the same parameter type, e.g. 'HK'. Similarly, when parameters is used, only one value for partyp should be supplied.