From a7369fb62f48b293342ec637241a4f9d38cbbe2f Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 31 Jul 2024 16:34:38 -0500 Subject: [PATCH] Fix bottomDepth when filling bathymetry holes In MPAS-Ocean init mode, when filling holes in the bathymetry (cells with deepest layers that are deeper than any of their neighbors) as part of the Haney-number-constrained vertical coordinate used for ice shelves, the bottom depth was not also being updated correctly for some cells. This merge fixes the issue for cells in the z-level region of the ocean (far from ice-shelf cavities) by setting the bottom depth to the deepest depth within the same z level as the deepest neighbor. --- .../mpas-ocean/src/mode_init/mpas_ocn_init_vertical_grids.F | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/mpas-ocean/src/mode_init/mpas_ocn_init_vertical_grids.F b/components/mpas-ocean/src/mode_init/mpas_ocn_init_vertical_grids.F index 5c0ac5a0e114..d84291ed376b 100644 --- a/components/mpas-ocean/src/mode_init/mpas_ocn_init_vertical_grids.F +++ b/components/mpas-ocean/src/mode_init/mpas_ocn_init_vertical_grids.F @@ -1480,6 +1480,7 @@ subroutine ocn_init_vertical_grid_with_max_rx1(domain, iErr) call mpas_pool_get_dimension(meshPool, 'nCellsSolve', nCellsSolve) call mpas_pool_get_array(meshPool, 'nEdgesOnCell', nEdgesOnCell) call mpas_pool_get_array(meshPool, 'cellsOnCell', cellsOnCell) + call mpas_pool_get_array(meshPool, 'bottomDepth', bottomDepth) ! Fill bathymetry holes, i.e. single cells that are deeper than all neighbors. ! These cells can collect tracer extrema and are not able to use @@ -1497,6 +1498,9 @@ subroutine ocn_init_vertical_grid_with_max_rx1(domain, iErr) if (maxLevelCell(iCell) > maxLevelNeighbors) then maxLevelCell(iCell) = maxLevelNeighbors + if (smoothingMask(iCell) == 0) then + bottomDepth(iCell) = refBottomDepth(maxLevelNeighbors) + end if end if end do