SimPEG.utils.surface2ind_topo#
- SimPEG.utils.surface2ind_topo(mesh, topo, gridLoc='CC', method='nearest', fill_value=nan)[source]#
Get indices of active cells from topography.
For a mesh and surface topography, this function returns the indices of cells lying below the discretized surface topography.
- Parameters:
- mesh
discretize.TensorMesh
ordiscretize.TreeMesh
Mesh on which you want to identify active cells
- topo(
n
, 3)numpy.ndarray
Topography data as a
numpyndarray
with columns [x,y,z]; can use [x,z] for 2D meshes. Topography data can be unstructured.- gridLoc
str
{‘CC’, ‘N’} If ‘CC’, all cells whose centers are below the topography are active cells. If ‘N’, then cells must lie entirely below the topography in order to be active cells.
- method
str
{‘nearest’,’linear’} Interpolation method for approximating topography at cell’s horizontal position. Default is ‘nearest’.
- fill_value
float
Defines the elevation for cells outside the horizontal extent of the topography data. Default is
numpy.nan
.
- mesh
- Returns:
- (
n_active
)numpy.ndarray
of
int
Indices of active cells below xyz.
- (