Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPAS-Ocean standalone] Fix bottom depth when filling bathymetry holes #6535

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines 1499 to 1505
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix makes this treatment within the haney-number coordinate (but outside the "smoothing mask" that defines the region where the haney-number coordinate is actually applied) consistent with the same code in the z-star coordinate used without ice shelf cavities, see:

if (maxLevelCell(iCell) > maxLevelNeighbors) then
maxLevelCell(iCell) = maxLevelNeighbors
bottomDepth(iCell) = refBottomDepth(maxLevelNeighbors)
end if


Expand Down