polaris.tasks.e3sm.init.topo.cull.dc_edge_diagnostics.check_ocean_dv_edge

polaris.tasks.e3sm.init.topo.cull.dc_edge_diagnostics.check_ocean_dv_edge(ds_base_mesh, ocean_no_cavities_cull_mask, ds_sizing, min_abs_ratio, logger, out_filename='ocean_dv_edge_diagnostics.nc')[source]

Check that the shortest dvEdge in the sea-ice domain, the ocean without ice-shelf cavities, is not too short for the sea-ice time step.

dvEdge is the length of a cell side. MPAS-Seaice’s incremental remapping needs the distance ice travels in one dynamics time step to stay below the shortest side meeting at each vertex, so the shortest dvEdge in the domain limits the sea-ice time step much as the shortest dcEdge limits the ocean’s (see check_ocean_dc_edge()).

Edges are measured against the side of a regular hexagon whose cell-center spacing is the ocean background cell width, which is the background divided by sqrt(3), so a perfect hexagonal mesh has a ratio of 1. Every edge of a kept cell is checked, including edges on the coastline, because sea-ice advection uses those too. A diagnostics file with the per-edge ratio to the local background is written, and a ValueError is raised if the shortest edge, measured against the finest ocean background anywhere in the domain, falls below min_abs_ratio.

Parameters:
  • ds_base_mesh (xarray.Dataset) – The base MPAS mesh, with dvEdge, latEdge, lonEdge and cellsOnEdge

  • ocean_no_cavities_cull_mask (xarray.DataArray or numpy.ndarray) – The ocean-without-cavities cull mask on base-mesh cells (1 where cells are culled, 0 where they are kept as ocean and sea ice)

  • ds_sizing (xarray.Dataset) – The unified sizing field, with ocean_background_cell_width (km) on lat/lon coordinates (degrees)

  • min_abs_ratio (float) – The minimum allowed ratio of the shortest dvEdge anywhere in the domain to the regular-hexagon side at the finest ocean background anywhere in it

  • logger (logging.Logger) – The logger for summary output

  • out_filename (str, optional) – The name of the diagnostics file to write

Raises:

ValueError – If the shortest edge violates the absolute bound