From 66ac386c801275beb0e9483eac20367c6d714345 Mon Sep 17 00:00:00 2001 From: Mark Petersen Date: Wed, 5 Oct 2022 17:11:33 -0600 Subject: [PATCH] add zeroing of velocity to init_mode --- components/mpas-ocean/src/mode_init/mpas_ocn_init_mode.F | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/mpas-ocean/src/mode_init/mpas_ocn_init_mode.F b/components/mpas-ocean/src/mode_init/mpas_ocn_init_mode.F index fc214973f8ac..5dc03ff5faf7 100644 --- a/components/mpas-ocean/src/mode_init/mpas_ocn_init_mode.F +++ b/components/mpas-ocean/src/mode_init/mpas_ocn_init_mode.F @@ -267,9 +267,15 @@ function ocn_init_mode_run(domain) result(iErr)!{{{ type (mpas_pool_type), pointer :: forcingPool type (MPAS_timeInterval_type) :: timeStep + real (kind=RKIND), dimension(:,:), pointer :: normalVelocity ierr = 0 + ! Initialize normalVelocity to zero for cases that do not specify it. + call mpas_pool_get_subpool(domain % blocklist % structs, 'state', statePool) + call mpas_pool_get_array(statePool, 'normalVelocity', normalVelocity, 1) + normalVelocity(:,:) = 0.0_RKIND + ! Eventually, dt should be domain specific timeStep = mpas_get_clock_timestep(domain % clock, ierr=ierr) call mpas_get_timeInterval(timeStep, dt=dt)