diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index 3d49e0546269..bad3e8dc5450 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -2537,8 +2537,8 @@
description="horizontal velocity used to transport mass and tracers"
packages="forwardMode;analysisMode"
/>
-
0.0_RKIND .and. config_zero_drying_velocity) then
+ if (abs(wettingVelocityFactor(k, iEdge)) > 0.0_RKIND .and. config_zero_drying_velocity) then
normalTransportVelocity(k, iEdge) = 0.0_RKIND
normalVelocity(k, iEdge) = 0.0_RKIND
end if
@@ -304,7 +296,7 @@ end subroutine ocn_prevent_drying_rk4 !}}}
!-----------------------------------------------------------------------
subroutine ocn_wetting_drying_wettingVelocity(layerThickEdgeFlux, layerThicknessCur, layerThicknessProvis, &
- normalVelocity, dt, wettingVelocity, err)!{{{
+ normalVelocity, dt, wettingVelocityFactor, err)!{{{
!-----------------------------------------------------------------
!
@@ -334,7 +326,7 @@ subroutine ocn_wetting_drying_wettingVelocity(layerThickEdgeFlux, layerThickness
!-----------------------------------------------------------------
real (kind=RKIND), dimension(:,:), intent(inout) :: &
- wettingVelocity !< Input/Output: velocity wettingVelocityency
+ wettingVelocityFactor !< Input/Output: velocity wettingVelocityFactor
!-----------------------------------------------------------------
!
@@ -386,12 +378,9 @@ subroutine ocn_wetting_drying_wettingVelocity(layerThickEdgeFlux, layerThickness
iEdge = edgesOnCell(i, iCell)
if (k <= maxLevelEdgeBot(iEdge) .or. k >= minLevelEdgeTop(iEdge)) then
if ( normalVelocity(k, iEdge) * edgeSignOnCell(i, iCell) <= 0.0_RKIND ) then
- ! each outgoing velocity is penalized (but not the incoming, wetting velocities)
- ! square the fractional term to make values near zero go to zero much quicker (to prevent threshold from being hit)
- wettingVelocity(k, iEdge) = - (min(max(0.0_RKIND, 1.0_RKIND - (divOutFlux*divOutFlux)), 1.0_RKIND)) * normalVelocity(k, iEdge)
! just go with simple boolean approach for zero wetting velocity for debugging purposes
if (config_zero_drying_velocity) then
- wettingVelocity(k, iEdge) = 1.0_RKIND
+ wettingVelocityFactor(k, iEdge) = 1.0_RKIND
end if
end if
end if