From 54a3220e92d2ffd50790c4303dcc0b3c39795b1b Mon Sep 17 00:00:00 2001 From: Hyun Kang Date: Thu, 26 Oct 2023 08:56:28 -0400 Subject: [PATCH] Initialize normalVelocity=0 at the top of the domain - Initialize normalVelocity=0 at the top of the domain to fix the restart issue --- .../mpas_ocn_time_integration_split_ab2.F | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F index f6d6a3c40ece..b831ca6650e5 100644 --- a/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F +++ b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F @@ -3238,10 +3238,15 @@ subroutine ocn_time_integration_split_ab2_init(domain)!{{{ call mpas_pool_get_array(meshPool, 'minLevelEdgeBot', minLevelEdgeBot) call mpas_pool_get_array(meshPool, 'maxLevelEdgeTop', maxLevelEdgeTop) + ! normalVelocity=0 on inactive cells do iEdge = 1, nEdges - kmax = maxLevelEdgeTop(iEdge) - ! normalVelocity=0 on land cells - do k = kmax+1, nVertLevels + ! at top + do k = 1, minLevelEdgeBot(iEdge)-1 + normalVelocity(k,iEdge) = 0.0_RKIND + enddo + + ! at bottom + do k = maxLevelEdgeTop(iEdge)+1, nVertLevels normalVelocity(k,iEdge) = 0.0_RKIND enddo enddo ! edge loop