Skip to content

Commit

Permalink
Fix bottomDepth when filling bathymetry holes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xylar committed Jul 31, 2024
1 parent c7d7998 commit a7369fb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit a7369fb

Please sign in to comment.