polaris.ocean.vertical.bathymetry_holes.fill_max_level_holes
- polaris.ocean.vertical.bathymetry_holes.fill_max_level_holes(max_level_cell: ndarray, cells_on_cell: ndarray, n_edges_on_cell: ndarray) ndarray[source]
Cap each cell’s
maxLevelCellat its deepest ocean neighbor, iterating until no cell is deeper than all of its neighbors.The operation only ever reduces
maxLevelCell(never deepens a column), and it leaves land/invalid columns (maxLevelCell == 0) untouched.- Parameters:
max_level_cell (numpy.ndarray) – 1-based index of the bottom valid level for each cell (0 for land/invalid columns), shape
(nCells,).cells_on_cell (numpy.ndarray) – 0-based neighbor cell indices for each cell, shape
(nCells, maxEdges). Entries< 0mark missing neighbors.n_edges_on_cell (numpy.ndarray) – Number of valid edges (neighbors) for each cell, shape
(nCells,).
- Returns:
numpy.ndarray – Updated 1-based
maxLevelCellwith isolated deep pits removed.