polaris.tasks.e3sm.init.topo.cull.consistency.check_critical_passages
- polaris.tasks.e3sm.init.topo.cull.consistency.check_critical_passages(ocean_cull_mask, ds_transects, logger, max_cells=10)[source]
Check that no cell on a critical ocean passage was culled from the ocean.
A critical passage exists to keep a strait open that the topography alone would close, so a cell removed from one is a passage that the mesh cannot support: either it is too coarse to resolve the strait, or the transect wanders onto land. Either way the transect is the thing to fix, so the error names it.
- Parameters:
ocean_cull_mask (xarray.DataArray or numpy.ndarray) – The final ocean cull mask on base-mesh cells (1 where cells are culled, 0 where they are kept)
ds_transects (xarray.Dataset) – The widened critical ocean transects, with
transectCellMasksandtransectNameslogger (logging.Logger) – The logger for summary output
max_cells (int, optional) – The maximum number of offending cell indices to report per transect
- Raises:
ValueError – If any critical passage lost a cell