R/utils.R
rmf_convert_huf_to_grid.RdConvert 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 )
| huf | huf object |
|---|---|
| dis | dis object |
| parameters | a list of huf parameters. Defaults to the parameters of the supplied |
| values | vector of parameter values of length |
| grid | target grid; either |
| mask | masking 3d array for averaging, typically the |
| type | type of averaging that should be performed when |
| partyp | which parameter type to convert; used to subset |
| pval | optional |
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'
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.