Skip to content

Commit

Permalink
Merge branch 'xylar/ocn/fix-bottom-depth-for-haney-coordinate' (PR E3…
Browse files Browse the repository at this point in the history
…SM-Project#6535)

Fix bottom depth 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.

[BFB] MPAS-Ocean standalone only
  • Loading branch information
jonbob committed Aug 8, 2024
2 parents ebb7301 + a7369fb commit 727ad81
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 727ad81

Please sign in to comment.