compass.landice.mesh.gridded_flood_fill

compass.landice.mesh.gridded_flood_fill(field)[source]

Generic flood-fill routine to create mask of connected elements in the desired input array (field) from a gridded dataset. This is generally used to remove glaciers and ice-fields that are not connected to the ice sheet. Note that there may be more efficient algorithms.

Parameters

field (numpy.ndarray) – Array from gridded dataset to use for flood-fill. Usually ice thickness.

Returns

flood_mask (numpy.ndarray) – _mask calculated by the flood fill routine, where cells connected to the ice sheet (or main feature) are 1 and everything else is 0.