polaris.tasks.e3sm.init.topo.cull.land_locked.remove_ocean_land_locked_cells

polaris.tasks.e3sm.init.topo.cull.land_locked.remove_ocean_land_locked_cells(ds_mesh, ocean_mask, ocean_seed_mask)[source]

Refine the ocean domain alone, removing the cells through which a C-grid cannot circulate and those that are not connected to the open ocean.

A cell needs at least two active edges, a way in and a way out. The two need not be adjacent and no condition on vertices applies, because the ocean’s velocities live at edges.

This is the ocean half of remove_land_locked_cells() and is used on its own where the ocean domain is needed before the land-ice mask exists.

Parameters:
  • ds_mesh (xarray.Dataset) – An MPAS mesh with cellsOnCell and nEdgesOnCell

  • ocean_mask (numpy.ndarray) – A boolean mask on cells, True for the candidate ocean domain

  • ocean_seed_mask (numpy.ndarray) – A boolean mask on cells, True at the seed cells for the flood fill

Returns:

ocean_mask (numpy.ndarray) – The refined ocean domain