polaris.mesh.connectivity.connected_to_seeds
- polaris.mesh.connectivity.connected_to_seeds(ds_mesh, cell_mask, seed_mask, link_mask=None)[source]
Find the cells of the domain that are connected to at least one seed cell.
- Parameters:
ds_mesh (xarray.Dataset) – An MPAS mesh with
cellsOnCellandnEdgesOnCellcell_mask (numpy.ndarray or xarray.DataArray) – A boolean mask on cells that is True for cells in the domain
seed_mask (numpy.ndarray or xarray.DataArray) – A boolean mask on cells that is True at the seed cells. Seeds outside the domain are ignored.
link_mask (numpy.ndarray, optional) – A boolean array of shape
(nCells, maxEdges)selecting the local edges that connect cells. The default connects every active edge, which is the ocean’s C-grid connectivity; pass the result oftransport_link_mask()for the sea ice’s B-grid connectivity.
- Returns:
connected (numpy.ndarray) – A boolean array of shape
(nCells,)that is True for cells in the domain that are reachable from a seed