From 6b92c01ffe82d832ecc2114b9d717887a584c6a6 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Thu, 3 Sep 2020 09:29:38 -0500 Subject: [PATCH 1/2] Fixes limiting on redi k33 on the vertical redi term, the surface scaling is currently being applied twice. This PR removes that. It also reorganizes the code to increase the strength of slope limiting on k33. --- src/core_ocean/shared/mpas_ocn_gm.F | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/core_ocean/shared/mpas_ocn_gm.F b/src/core_ocean/shared/mpas_ocn_gm.F index 05ed936300..654c03131c 100644 --- a/src/core_ocean/shared/mpas_ocn_gm.F +++ b/src/core_ocean/shared/mpas_ocn_gm.F @@ -415,13 +415,25 @@ subroutine ocn_GM_compute_Bolus_velocity(statePool, diagnosticsPool, & slopeTriadDown(k, iCellSelf, iEdge) = & slopeTaperDown*sfcTaperDown*slopeTriadDown(k, iCellSelf, iEdge) + ! Griffies 1998 eqn 34 + if (k > 1) then + k33(k, iCell) = k33(k, iCell) + & + areaEdge*dzTop(k)*slopeTriadUp(k, iCellSelf, iEdge)**2 + k33Norm(k) = k33Norm(k) + areaEdge*dzTop(k) + end if + + !Taper Redi by tapering the slopes + k33(k + 1, iCell) = k33(k + 1, iCell) + & + areaEdge*dzTop(k + 1)*slopeTriadDown(k, iCellSelf, iEdge)**2 + k33Norm(k + 1) = k33Norm(k + 1) + areaEdge*dzTop(k + 1) + + end do ! maxLevelEdgeTop(iEdge) end do ! nEdgesOnCell(iCell) ! Normalize k33 do k = 2, maxLevelCell(iCell) - k33(k, iCell) = k33(k, iCell)/k33Norm(k)*RediKappaSfcTaper(k, iCell)* & - RediKappaScaling(k, iCell) + k33(k, iCell) = k33(k, iCell)/k33Norm(k)*RediKappaScaling(k, iCell) end do k33(1, iCell) = 0.0_RKIND k33(maxLevelCell(iCell) + 1, iCell) = 0.0_RKIND From 845ecdc3384433893d32d6c37e5513b5984f509c Mon Sep 17 00:00:00 2001 From: Mark Petersen Date: Thu, 10 Sep 2020 15:22:54 -0600 Subject: [PATCH 2/2] Remove extra k33 and k33Norm calculation --- src/core_ocean/shared/mpas_ocn_gm.F | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/core_ocean/shared/mpas_ocn_gm.F b/src/core_ocean/shared/mpas_ocn_gm.F index 654c03131c..1ff2a20732 100644 --- a/src/core_ocean/shared/mpas_ocn_gm.F +++ b/src/core_ocean/shared/mpas_ocn_gm.F @@ -398,18 +398,6 @@ subroutine ocn_GM_compute_Bolus_velocity(statePool, diagnosticsPool, & sfcTaperUp = 1.0_RKIND + sfcTaperFactor*(sfcTaper - 1.0_RKIND) sfcTaperDown = 1.0_RKIND + sfcTaperFactor*(sfcTaper - 1.0_RKIND) - ! Griffies 1998 eqn 34 - if (k > 1) then - k33(k, iCell) = k33(k, iCell) + slopeTaperUp*sfcTaperUp* & - areaEdge*dzTop(k)*slopeTriadUp(k, iCellSelf, iEdge)**2 - k33Norm(k) = k33Norm(k) + areaEdge*dzTop(k) - end if - - !Taper Redi by tapering the slopes - k33(k + 1, iCell) = k33(k + 1, iCell) + slopeTaperDown*sfcTaperDown* & - areaEdge*dzTop(k + 1)*slopeTriadDown(k, iCellSelf, iEdge)**2 - k33Norm(k + 1) = k33Norm(k + 1) + areaEdge*dzTop(k + 1) - slopeTriadUp(k, iCellSelf, iEdge) = & slopeTaperUp*sfcTaperUp*slopeTriadUp(k, iCellSelf, iEdge) slopeTriadDown(k, iCellSelf, iEdge) = &