Access grid information from a vertex-grid (disV) #1992
-
Hi, I have browsed the forum and the flopy documentation to no avail... I'm trying to access the grid information of a pre-generated vertex grid (by modelmuse). I figured the flopy.utils.gridgen.get_gridprops_disv() should be useful for this, but for whatever reason I'm not succeeding in importing the grid properties. I did try to follow the steps in this example: From what it seems it needs to generate or import a normal dis-grid and insert a refinement after. Can it be done? edit: By the way. Running the following code `# load a modflow-6 simulation get a model object from the simulationm = sim.get_model("mod0000") access the modelgridmodelgrid = m.modelgrid()` gives me this error AttributeError Traceback (most recent call last) AttributeError: 'NoneType' object has no attribute 'modelgrid' Sincerely |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can load a vertex grid directly from a binary grid file. Alternatively, you can load a simulation with The error you are seeing indicates no model was found with the provided name. In this case flopy returns |
Beta Was this translation helpful? Give feedback.
Without your grid file it's hard to diagnose. It looks like it's not a DISV grid but a regular DIS. Note the same
from_binary_grid_file()
method is available onStructuredGrid
as well, does that work?