Is there a layer identifier for cell id's in the DISU package of Flopy / MODFLOW?

72 views Asked by At

For structered grids (DIS) Flopy creates arrays of parameters (e.g. hydraulic conductivity), one for each layer within the model. For unstructured grids (DISU), it sets up lists containing the parameters for all(!) cells, only identifiable with the cell index.

I am working on data assimilation and parameter estimation and I want to estimate and edit the hydraulic conductivity of only the second layer. While I (and I already did that) can just identify the indices corresponding to the second layer of my model, I want to generalize my module and am searching for a layer identifier that clearly links a cell id to a layer number.

Can I find this layer identifier within the DISU package?

1

There are 1 answers

0
abc On

I don't think you can find this within the DISU package, because the concept of layers simply does not exist once you use DISU.

But perhaps you might find this useful: In your gridgen object that I assume you used to create your DISU grid, there is a property called nodelay which lists the number of cells per layer.

For example, if you have 3 layers, and you want to assign kh value of 1, 2, 3 respectively:

import numpy as np

# assume gridgen.nodelay == [3, 4, 5]
kh_values = [1, 2, 3]
kh = np.repeat(kh_values, gridgen.nodelay)

# kh == array([1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3])