compass.landice.mesh.gridded_flood_fill
- compass.landice.mesh.gridded_flood_fill(field, iStart=None, jStart=None)[source]
Uses a flood fill to fill disconnected regions. Any disconnected regions are set to 0. This version uses scipy.ndimage.label() to identify connected components of field > 0, then keeps only the component containing the seed point.
- Parameters:
- Returns:
flood_mask (ndarray) – Integer mask with 1 for the connected component containing the seed, and 0 elsewhere.