@staticmethod
    def parameter_fill(model, shape, findkey, parm_dict, findlayer=None):
        dtype = np.float32
        data = np.zeros(shape, dtype=dtype)
        for key, tdict in parm_dict.items():
            partyp, parval = tdict['partyp'], tdict['parval']
            nclu, clusters = tdict['nclu'], tdict['clusters']
            if model.mfpar.pval is None:
                pv = np.float(parval)
            else:
                try:
                    pv = np.float(model.mfpar.pval.pval_dict[key.lower()])
                except:
                    pv = np.float(parval)
            #print partyp, parval, nclu, clusters
            if partyp == findkey:
                for [layer, mltarr, zonarr, izones] in clusters:
                    #print layer, mltarr, zonarr, izones
                    foundlayer = False
                    if findlayer == None:
                        foundlayer = True
                    else:
                        if layer == (findlayer + 1):
                            foundlayer = True
                    if foundlayer:
                        cluster_data = np.zeros(shape, dtype=dtype)
                        if mltarr.lower() == 'none':
                            mult = np.ones(shape, dtype=dtype)
                        else:
                            mult = model.mfpar.mult.mult_dict[mltarr.lower()][:, :]
                        if zonarr.lower() == 'all':
                            cluster_data = pv * mult
                        else:
                            mult_save = np.copy(mult)
                            za = model.mfpar.zone.zone_dict[zonarr.lower()][:, :]
                            # build a multiplier for all of the izones
                            mult = np.zeros(shape, dtype=dtype)
                            for iz in izones:
                                filtarr = za == iz
                                mult[filtarr] += np.copy(mult_save[filtarr])
                            # calculate parameter value for this cluster
                            cluster_data = pv * mult
                        # add data
                        data += cluster_data

        return data
Fill an array with parameters using zone, mult, and pval data.
dataset/ETHPy150Open modflowpy/flopy/flopy/modflow/mfpar.py/ModflowPar.parameter_fill