-
Notifications
You must be signed in to change notification settings - Fork 383
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
[MPAS-Ocean standalone] Fix bottom depth when filling bathymetry holes #6535
Conversation
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.
TestingI was able to run dynamic adjustment in Compass with the SORRM r3 mesh (MPAS-Dev/compass#807) using this fix. Without this fix, a single cell had a top layer thickness of ~140 m (compensating for a missing bottom layer), which led to other problems (e.g. a huge spike in temperature in that cell). |
if (maxLevelCell(iCell) > maxLevelNeighbors) then | ||
maxLevelCell(iCell) = maxLevelNeighbors | ||
if (smoothingMask(iCell) == 0) then | ||
bottomDepth(iCell) = refBottomDepth(maxLevelNeighbors) | ||
end if | ||
end if | ||
end do |
There was a problem hiding this comment.
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:
E3SM/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F
Lines 831 to 834 in 1e2c8e1
if (maxLevelCell(iCell) > maxLevelNeighbors) then | |
maxLevelCell(iCell) = maxLevelNeighbors | |
bottomDepth(iCell) = refBottomDepth(maxLevelNeighbors) | |
end if |
@cbegeman, could you have a quick look at this? I need this fix to make progress on the SORRM mesh. I don't think you need to run any tests, I just think it would be useful to have someone take a quick look at the code and you came to mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change looks good. Glad you were able to track it down!
It's interesting to me that it is necessary to move bottomDepth
up; that it isn't sufficient just to make sure that maxLevelCell
ensures continuity with its neighbors to avoid tracer issues. But we can chat about it when time isn't critical. I'm out the rest of the week.
I haven't looked in detail but the issue was that the sum of the layer thicknesses was not equal to Obviously, there should be a sanity check that the sum of layer thicknesses is equal to |
@cbegeman, thanks for having a look, by the way! |
@jonbob, I believe this is ready to go in whenever you have a slot for it. It should be trivial from E3SM's perspective since only MPAS-Ocean init mode is involved. |
…ext (PR #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
Passes:
merged to next |
merged to master |
Thanks @jonbob! |
This merge updates the E3SM-Project submodule from [c7d7998](https://github.com/E3SM-Project/E3SM/tree/c7d7998) to [727ad81](https://github.com/E3SM-Project/E3SM/tree/727ad81). This update includes the following MPAS-Ocean and MPAS-Frameworks PRs (check mark indicates bit-for-bit with previous PR in the list): - [ ] (ocn) E3SM-Project/E3SM#6456 - [ ] (ocn) E3SM-Project/E3SM#6510 - [ ] (ocn) E3SM-Project/E3SM#6535
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.