-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, the MOC analysis member is written for z-level coordinates, i.e. it sums horizontally by k levels. When this MOC is computed for any tilted coordinate (sigma-z, for example) it sums different depths together in zonal bins, which is incorrect.
I am numbering these comments, in case people want to reference them below:
- I think that the only alteration required for general vertical coordinates is to interpolate these variables:
normalVelocity
layerThickness
vertVelocityTop
vertGMBolusVelocityTop
to a reference z-grid just before horizontal summations are taken, here:
E3SM/components/mpas-ocean/src/analysis_members/mpas_ocn_moc_streamfunction.F
Lines 506 to 507 in 3a87fa1
| * normalVelocity(k,iEdge)*dvEdge(iEdge) & | |
| * 0.5_RKIND*(layerThickness(k,c1) + layerThickness(k,c2)) |
E3SM/components/mpas-ocean/src/analysis_members/mpas_ocn_moc_streamfunction.F
Lines 524 to 525 in 3a87fa1
| sumVertBinVelocityRegion(iBin, k, i) = sumVertBinVelocityRegion(iBin, k, i) + (vertVelocityTop(k, iCell) * & | |
| areaCell(iCell) * regionCellMasks(currentRegion, iCell)) |
E3SM/components/mpas-ocean/src/analysis_members/mpas_ocn_moc_streamfunction.F
Lines 605 to 606 in 417b03f
| * normalVelocity(k,iEdge)*dvEdge(iEdge) & | |
| * 0.5_RKIND*(layerThickness(k,c1) + layerThickness(k,c2)) |
E3SM/components/mpas-ocean/src/analysis_members/mpas_ocn_moc_streamfunction.F
Lines 623 to 624 in 3a87fa1
| sumVertBinVelocityRegion(iBin, k, i) = sumVertBinVelocityRegion(iBin, k, i) + (vertGMBolusVelocityTop(k, iCell) * & | |
| areaCell(iCell) * regionCellMasks(currentRegion, iCell)) |
-
The reference z-grid could be
refZMidandrefBottomDepth, and then everything would work in MPAS-Analysis. It could also be a higher-resolution z-grid for this specific purpose. I propose to use the first for simplicity. -
For background, you can compute a streamfunction
psi(y,z)by integratingv=-d psi/dzvertically orw = d psi/dyhorizontally, whereyhere is latitude. In the Fortran code we integratev=-d psi/dzvertically along the southern transect in line 506 to get the boundary condition. Then we integratew = d psi/dyin line 524 horizontally by latitude bins (this produces smoother statistics than integrating many transects vertically). Then we repeat that process for the GM Bolus velocity in lines 605 and 624. I know I've written that in latex a few times, can't find it right now... -
I would add the general-coordinate MOC as a separate subroutine, chosen by a flag, so our current standard z-level runs don't spend time on unneeded interpolation, and so I do not alter z-level code that is trusted.
-
The current subroutine computes for every edge and cell and multiplies by
regionCellMasks. I would change it to check the mask first, and only interpolate and sum if the mask = 1. -
I am seeking advice on the interpolation method. The only one currently in MPAS-Ocean is the linear
ocn_init_interpolation_linear_vert. We could add @dengwirda's https://github.com/dengwirda/PPR here, or perhaps @cbegeman already has one working on a general vertical coordinate branch, and we can merge that one early to use here as well. -
Related, we need to decide what order of interpolation is sufficient.
-
When interpolating horizontal and vertical velocity, is it important to exactly conserve the transport per edge-column and cell-column, respectively? Perhaps exact conservation is not important for a basin-wide diagnostic (as opposed to numerical methods for advection, say). I'm not sure this question even makes sense for interpolating vertical velocity vertically.