Given a multiplier array and/or zone array with corresponding zone numbers, calculate a rmf_2d_array or rmf_3d_array. Parameter values can be used to multiply the arrays as well.

rmf_calculate_array(dis, layer = NULL, mltarr, zonarr, iz = NULL, parval = 1)

Arguments

dis

dis object; used to set the dimensions of the array

layer

optional numeric vector with the layer indices to which mltarr, zonarr and iz apply. Should have the same length as mltarr, zonarr and iz. Only used for flow parameter arrays. See details.

mltarr

either a list of multiplier arrays or a single multiplier array. The keyword "NONE" indicates no multiplier array is present.

zonarr

either a list of the zone arrays or a single zone array. The keyword "ALL" indicates no zone array is present.

iz

only read when zonarr is not "ALL". A list where each element is a numeric vector with the zone numbers for the corresponding zone array.

parval

vector of parameter values corresponding to mltarr, zonarr and iz which are multiplied with the final array. Typically used when the array represents a parameter.

Value

rmf_2d_array or rmf_3d_array with the values calculated from the multiplier and/or zone arrays.

Details

if mltarr (zonarr) is a list, certain elements are allowed to be set to "NONE" ("ALL") indicating the multiplier (zone) array is not active for this cluster. if mltarr is "NULL" and zonarr is "ALL", all the cells in the returned array will be equal to the parameter value. Multiple multiplier arrays, zone arrays and/or parameter values can be used to calculate the final values. Cells that correspond to multiple multiplier arrays, zone arrays and/or parameter values will be summed. Resulting arrays for the same layer will also be summed. If more than 1 layer index is specified, a rmf_3d_array is returned