flopy.discretization.vertexgrid module¶
-
class
VertexGrid
(vertices=None, cell2d=None, top=None, botm=None, idomain=None, lenuni=None, epsg=None, proj4=None, prj=None, xoff=0.0, yoff=0.0, angrot=0.0, nlay=None, ncpl=None, cell1d=None)[source]¶ Bases:
flopy.discretization.grid.Grid
class for a vertex 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
-
extent
¶
-
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]¶ Get the CELL2D number of a point with coordinates x and y
When the point is on the edge of two cells, the cell with the lowest CELL2D number is returned.
Parameters: - x (float) – The x-coordinate of the requested point
- y (float) – The y-coordinate of the requested point
- local (bool (optional)) – If True, x and y are in local coordinates (defaults to False)
- forgive (bool (optional)) – Forgive x,y arguments that fall outside the model grid and return NaNs instead (defaults to False - will throw exception)
Returns: icell2d – The CELL2D number
Return type: int
-
is_complete
¶
-
is_valid
¶
-
ncpl
¶
-
nlay
¶
-
nnodes
¶
-
plot
(**kwargs)[source]¶ Plot the grid lines.
Parameters: kwargs (ax, colors. The remaining kwargs are passed into the) – the LineCollection constructor. Returns: lc Return type: matplotlib.collections.LineCollection
-
shape
¶
-
xyzcellcenters
¶ Method to get cell centers and set to grid
-
xyzvertices
¶ Method to get all grid vertices in a layer, arranged per cell
Returns: list of size sum(nvertices per cell)