compass.landice.mesh.mpas_flood_fill¶
- compass.landice.mesh.mpas_flood_fill(seed_mask, grow_mask, cellsOnCell, nEdgesOnCell, grow_iters=9223372036854775807)[source]¶
Flood-fill for mpas meshes using mpas cells.
- Parameters:
seed_mask (numpy.ndarray) – Integer array of locations from which to flood fill 0 = invalid, 1 = valid
grow_mask (numpy.ndarray) – Integer array of locations valid for growing into 0 = invalid, 1 = valid
cellsOnCell (numpy.ndarray) – cellsOnCell array from the mpas mesh
nEdgesOnCell (numpy.ndarray) – nEdgesOnCell array from the mpas mesh
grow_iters (integer) – optional argument limiting the number of iterations over which to extend the mask
- Returns:
keep_mask (numpy.ndarray) – mask calculated by the flood fill routine, where cells connected to seed_mask are 1 and everything else is 0.