flopy.discretization.unstructuredgrid module

class UnstructuredGrid(vertices=None, iverts=None, xcenters=None, ycenters=None, top=None, botm=None, idomain=None, lenuni=None, ncpl=None, epsg=None, proj4=None, prj=None, xoff=0.0, yoff=0.0, angrot=0.0, layered=True, nodes=None)[source]

Bases: flopy.discretization.grid.Grid

Class for an unstructured model grid

Parameters:
  • vertices – list of vertices that make up the grid
  • cell2d – list of cells and their vertices
  • Properties
  • ----------
  • vertices – returns list of vertices that make up the grid
  • cell2d – returns list of cells and their vertices
get_cell_vertices(cellid)[source]

returns vertices for a single cell at cellid.

extent
classmethod from_argus_export(fname, nlay=1)[source]

Create a new SpatialReferenceUnstructured grid from an Argus One Trimesh file

Parameters:
  • fname (string) – File name
  • nlay (int) – Number of layers to create
Returns:

sru

Return type:

flopy.utils.reference.SpatialReferenceUnstructured

get_cell_vertices(cellid)[source]
Method to get a set of cell vertices for a single cell
used in the Shapefile export utilities
Parameters:cellid – (int) cellid number

Returns ——- list of x,y cell vertices

grid_lines

Creates a series of grid line vertices for drawing a model grid line collection

Returns:grid line vertices
Return type:list
intersect(x, y, local=False, forgive=False)[source]
is_complete
is_valid
layered
ncpl
nlay
nnodes
shape
xyzcellcenters

Method to get cell centers and set to grid

xyzvertices

Method to get model grid verticies

Returns:list of dimension ncpl by nvertices