Skip to content

Commit 6ac9c74

Browse files
+Correct halo update sizes and reduce halo updates (#969)
Added the new argument dyn_h_stencil to initialize_dyn_split_RK2 and the other 3 dynamic core initialization routines to return the size of the stencil for thicknesses as used by the dynamic core, depending on the options that are being used for the Coriolis and continuity schemes, and then used this in a set of halo updates in step_MOM_dynamics. With this change some additional halo updates that have recently been added inside of step_MOM_dyn_split_RK2 and the other 3 dynamic core time stepping routines could be eliminated. All answers are bitwise identical, but there is a new argument to 4 public interfaces. Co-authored-by: Marshall Ward <marshall.ward@gmail.com>
1 parent 83a1048 commit 6ac9c74

File tree

5 files changed

+44
-63
lines changed

5 files changed

+44
-63
lines changed

src/core/MOM.F90

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ module MOM
294294
integer :: ntrunc !< number u,v truncations since last call to write_energy
295295

296296
integer :: cont_stencil !< The stencil for thickness from the continuity solver.
297+
integer :: dyn_h_stencil !< The stencil for thickness for the dynamics based on
298+
!! the continuity solver and Coriolis schemes.
297299
! These elements are used to control the dynamics updates.
298300
logical :: do_dynamics !< If false, does not call step_MOM_dyn_*. This is an
299301
!! undocumented run-time flag that is fragile.
@@ -1221,7 +1223,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
12211223
CS%MEKE, CS%VarMix, CS%CDp, CS%thickness_diffuse_CSp, &
12221224
CS%stoch_CS)
12231225
call cpu_clock_end(id_clock_thick_diff)
1224-
call pass_var(h, G%Domain, clock=id_clock_pass, halo=max(2,CS%cont_stencil))
1226+
call pass_var(h, G%Domain, clock=id_clock_pass, halo=CS%dyn_h_stencil)
12251227
if (showCallTree) call callTree_waypoint("finished thickness_diffuse_first (step_MOM)")
12261228
endif
12271229

@@ -1232,7 +1234,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
12321234
call interface_filter(h, CS%uhtr, CS%vhtr, CS%tv, dt_tr_adv, G, GV, US, &
12331235
CS%CDp, CS%interface_filter_CSp)
12341236
call cpu_clock_end(id_clock_int_filter)
1235-
call pass_var(h, G%Domain, clock=id_clock_pass, halo=max(2,CS%cont_stencil))
1237+
call pass_var(h, G%Domain, clock=id_clock_pass, halo=CS%dyn_h_stencil)
12361238
if (showCallTree) call callTree_waypoint("finished interface_filter_first (step_MOM)")
12371239
endif
12381240

@@ -1345,7 +1347,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
13451347
do j=js,je ; do I=isq,ieq
13461348
u(I,j,:) = u(I,j,:) + Waves%ddt_us_x(I,j,:)*dt
13471349
enddo; enddo
1348-
call pass_vector(u,v,G%Domain)
1350+
call pass_vector(u, v, G%Domain)
13491351
endif
13501352
! Added an additional output to track Stokes drift time tendency.
13511353
! It is mostly for debugging, and perhaps doesn't need to hang
@@ -1375,7 +1377,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
13751377
CS%MEKE, CS%VarMix, CS%CDp, CS%thickness_diffuse_CSp, CS%stoch_CS)
13761378

13771379
call cpu_clock_end(id_clock_thick_diff)
1378-
call pass_var(h, G%Domain, clock=id_clock_pass, halo=max(2,CS%cont_stencil))
1380+
call pass_var(h, G%Domain, clock=id_clock_pass, halo=CS%dyn_h_stencil)
13791381
if (CS%debug) call hchksum(h,"Post-thickness_diffuse h", G%HI, haloshift=1, unscale=GV%H_to_MKS)
13801382
if (showCallTree) call callTree_waypoint("finished thickness_diffuse (step_MOM)")
13811383
endif
@@ -1392,7 +1394,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
13921394
CS%CDp, CS%interface_filter_CSp)
13931395
endif
13941396
call cpu_clock_end(id_clock_int_filter)
1395-
call pass_var(h, G%Domain, clock=id_clock_pass, halo=max(2,CS%cont_stencil))
1397+
call pass_var(h, G%Domain, clock=id_clock_pass, halo=CS%dyn_h_stencil)
13961398
if (showCallTree) call callTree_waypoint("finished interface_filter (step_MOM)")
13971399
endif
13981400
endif
@@ -1408,7 +1410,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_tr_adv, &
14081410
call mixedlayer_restrat(h, CS%uhtr, CS%vhtr, CS%tv, forces, dt, CS%visc%MLD, CS%visc%h_ML, &
14091411
CS%visc%sfc_buoy_flx, CS%VarMix, G, GV, US, CS%mixedlayer_restrat_CSp)
14101412
call cpu_clock_end(id_clock_ml_restrat)
1411-
call pass_var(h, G%Domain, clock=id_clock_pass, halo=max(2,CS%cont_stencil))
1413+
call pass_var(h, G%Domain, clock=id_clock_pass, halo=CS%dyn_h_stencil)
14121414
if (CS%debug) then
14131415
call hchksum(h,"Post-mixedlayer_restrat h", G%HI, haloshift=1, unscale=GV%H_to_MKS)
14141416
call uvchksum("Post-mixedlayer_restrat [uv]htr", &
@@ -3506,13 +3508,15 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
35063508
G, GV, US, param_file, diag, CS%dyn_split_RK2b_CSp, CS%HA_CSp, restart_CSp, &
35073509
CS%dt, CS%ADp, CS%CDp, MOM_internal_state, CS%VarMix, CS%MEKE, &
35083510
CS%thickness_diffuse_CSp, CS%OBC, CS%update_OBC_CSp, CS%ALE_CSp, CS%set_visc_CSp, &
3509-
CS%visc, dirs, CS%ntrunc, CS%pbv, calc_dtbt=calc_dtbt, cont_stencil=CS%cont_stencil)
3511+
CS%visc, dirs, CS%ntrunc, CS%pbv, calc_dtbt=calc_dtbt, &
3512+
cont_stencil=CS%cont_stencil, dyn_h_stencil=CS%dyn_h_stencil)
35103513
else
35113514
call initialize_dyn_split_RK2(CS%u, CS%v, CS%h, CS%tv, CS%uh, CS%vh, eta, Time, &
35123515
G, GV, US, param_file, diag, CS%dyn_split_RK2_CSp, CS%HA_CSp, restart_CSp, &
35133516
CS%dt, CS%ADp, CS%CDp, MOM_internal_state, CS%VarMix, CS%MEKE, &
35143517
CS%thickness_diffuse_CSp, CS%OBC, CS%update_OBC_CSp, CS%ALE_CSp, CS%set_visc_CSp, &
3515-
CS%visc, dirs, CS%ntrunc, CS%pbv, calc_dtbt=calc_dtbt, cont_stencil=CS%cont_stencil)
3518+
CS%visc, dirs, CS%ntrunc, CS%pbv, calc_dtbt=calc_dtbt, &
3519+
cont_stencil=CS%cont_stencil, dyn_h_stencil=CS%dyn_h_stencil)
35163520
endif
35173521
if (CS%dtbt_reset_period > 0.0) then
35183522
CS%dtbt_reset_interval = real_to_time(US%T_to_s*CS%dtbt_reset_period)
@@ -3531,14 +3535,15 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
35313535
US, param_file, diag, CS%dyn_unsplit_RK2_CSp, &
35323536
CS%ADp, CS%CDp, MOM_internal_state, CS%OBC, &
35333537
CS%update_OBC_CSp, CS%ALE_CSp, CS%set_visc_CSp, CS%visc, dirs, &
3534-
CS%ntrunc, cont_stencil=CS%cont_stencil)
3538+
CS%ntrunc, cont_stencil=CS%cont_stencil, dyn_h_stencil=CS%dyn_h_stencil)
35353539
else
35363540
call initialize_dyn_unsplit(CS%u, CS%v, CS%h, CS%tv, Time, G, GV, &
35373541
US, param_file, diag, CS%dyn_unsplit_CSp, &
35383542
CS%ADp, CS%CDp, MOM_internal_state, CS%OBC, &
35393543
CS%update_OBC_CSp, CS%ALE_CSp, CS%set_visc_CSp, CS%visc, dirs, &
3540-
CS%ntrunc, cont_stencil=CS%cont_stencil)
3544+
CS%ntrunc, cont_stencil=CS%cont_stencil, dyn_h_stencil=CS%dyn_h_stencil)
35413545
endif
3546+
CS%dyn_h_stencil = max(2, CS%dyn_h_stencil)
35423547

35433548
!Set OBC segment data update period
35443549
if (associated(CS%OBC) .and. CS%dt_obc_seg_period > 0.0) then

src/core/MOM_dynamics_split_RK2.F90

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,6 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
495495
call create_group_pass(CS%pass_hp_uv, hp, G%Domain, halo=cor_stencil)
496496
call create_group_pass(CS%pass_hp_uv, u_av, v_av, G%Domain, halo=max(cor_stencil,vel_stencil))
497497
call create_group_pass(CS%pass_hp_uv, uh(:,:,:), vh(:,:,:), G%Domain, halo=max(cor_stencil,vel_stencil))
498-
if (cor_stencil > 2) then
499-
call create_group_pass(CS%pass_hp_uv, h, G%Domain, halo=cor_stencil)
500-
endif
501498
call create_group_pass(CS%pass_h, h, g%domain, halo=max(cor_stencil,cont_stencil))
502499
call create_group_pass(CS%pass_av_uvh, u_av, v_av, g%domain, halo=max(cor_stencil,vel_stencil))
503500
call create_group_pass(CS%pass_av_uvh, uh(:,:,:), vh(:,:,:), G%Domain, halo=max(cor_stencil,vel_stencil))
@@ -807,12 +804,7 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
807804

808805
! These should be done with a pass that excludes uh & vh.
809806
! call do_group_pass(CS%pass_hp_uv, G%Domain, clock=id_clock_pass)
810-
endif
811-
812-
if (G%nonblocking_updates) then
813-
call start_group_pass(CS%pass_av_uvh, G%Domain, clock=id_clock_pass)
814-
else
815-
call do_group_pass(CS%pass_av_uvh, G%domain, clock=id_clock_pass)
807+
call pass_vector(u_av, v_av, G%Domain, halo=max(cor_stencil,vel_stencil), clock=id_clock_pass)
816808
endif
817809

818810
! h_av = (h + hp)/2
@@ -874,9 +866,6 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
874866
if (showCallTree) call callTree_wayPoint("done with PressureForce[hp=(1-b).h+b.h] (step_MOM_dyn_split_RK2)")
875867
endif
876868

877-
if (G%nonblocking_updates) &
878-
call complete_group_pass(CS%pass_av_uvh, G%Domain, clock=id_clock_pass)
879-
880869
if (BT_cont_BT_thick) then
881870
call btcalc(h, G, GV, CS%barotropic_CSp, CS%BT_cont%h_u, CS%BT_cont%h_v, &
882871
OBC=CS%OBC)
@@ -1360,7 +1349,7 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
13601349
diag, CS, HA_CSp, restart_CS, dt, Accel_diag, Cont_diag, MIS, &
13611350
VarMix, MEKE, thickness_diffuse_CSp, &
13621351
OBC, update_OBC_CSp, ALE_CSp, set_visc, &
1363-
visc, dirs, ntrunc, pbv, calc_dtbt, cont_stencil)
1352+
visc, dirs, ntrunc, pbv, calc_dtbt, cont_stencil, dyn_h_stencil)
13641353
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
13651354
type(verticalGrid_type), intent(in) :: GV !< ocean vertical grid structure
13661355
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
@@ -1406,6 +1395,9 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
14061395
type(porous_barrier_type), intent(in) :: pbv !< porous barrier fractional cell metrics
14071396
integer, intent(out) :: cont_stencil !< The stencil for thickness
14081397
!! from the continuity solver.
1398+
integer, intent(out) :: dyn_h_stencil !< The stencil for thickness for the
1399+
!! the dynamics based on the continuity
1400+
!! solver and Coriolis scheme.
14091401

14101402
! local variables
14111403
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_tmp ! A temporary copy of the layer thicknesses [H ~> m or kg m-2]
@@ -1436,7 +1428,6 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
14361428
endif
14371429
CS%module_is_initialized = .true.
14381430

1439-
14401431
CS%diag => diag
14411432

14421433
call log_version(param_file, mdl, version, "")
@@ -1573,6 +1564,7 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
15731564
cont_stencil = continuity_stencil(CS%continuity_CSp)
15741565
call CoriolisAdv_init(Time, G, GV, US, param_file, diag, CS%ADp, CS%CoriolisAdv)
15751566
cor_stencil = CoriolisAdv_stencil(CS%CoriolisAdv)
1567+
dyn_h_stencil = max(cont_stencil, CoriolisAdv_stencil(CS%CoriolisAdv))
15761568
if (CS%calculate_SAL) call SAL_init(h, tv, G, GV, US, param_file, CS%SAL_CSp, restart_CS)
15771569
if (CS%use_tides) then
15781570
call tidal_forcing_init(Time, G, US, param_file, CS%tides_CSp, CS%HA_CSp)
@@ -1646,16 +1638,14 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
16461638
filename=dirs%input_filename, directory=dirs%restart_input_dir, &
16471639
success=read_h2, scale=1.0/GV%H_to_mks)
16481640
if (read_uv .and. read_h2) then
1649-
call pass_var(CS%h_av, G%Domain, halo=cor_stencil, clock=id_clock_pass_init)
1641+
call pass_var(CS%h_av, G%Domain, clock=id_clock_pass_init)
16501642
else
16511643
do k=1,nz ; do j=jsd,jed ; do i=isd,ied ; h_tmp(i,j,k) = h(i,j,k) ; enddo ; enddo ; enddo
16521644
call continuity(CS%u_av, CS%v_av, h, h_tmp, uh, vh, dt, G, GV, US, CS%continuity_CSp, CS%OBC, pbv)
16531645
call pass_var(h_tmp, G%Domain, clock=id_clock_pass_init)
16541646
do k=1,nz ; do j=jsd,jed ; do i=isd,ied
16551647
CS%h_av(i,j,k) = 0.5*(h(i,j,k) + h_tmp(i,j,k))
16561648
enddo ; enddo ; enddo
1657-
call pass_var(CS%h_av, G%Domain, halo=cor_stencil, clock=id_clock_pass_init)
1658-
16591649
endif
16601650
call pass_vector(CS%u_av, CS%v_av, G%Domain, halo=cor_stencil, clock=id_clock_pass_init, complete=.false.)
16611651
call pass_vector(uh, vh, G%Domain, halo=cor_stencil, clock=id_clock_pass_init, complete=.true.)

src/core/MOM_dynamics_split_RK2b.F90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ subroutine initialize_dyn_split_RK2b(u, v, h, tv, uh, vh, eta, Time, G, GV, US,
12591259
diag, CS, HA_CSp, restart_CS, dt, Accel_diag, Cont_diag, MIS, &
12601260
VarMix, MEKE, thickness_diffuse_CSp, &
12611261
OBC, update_OBC_CSp, ALE_CSp, set_visc, &
1262-
visc, dirs, ntrunc, pbv, calc_dtbt, cont_stencil)
1262+
visc, dirs, ntrunc, pbv, calc_dtbt, cont_stencil, dyn_h_stencil)
12631263
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
12641264
type(verticalGrid_type), intent(in) :: GV !< ocean vertical grid structure
12651265
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
@@ -1305,6 +1305,9 @@ subroutine initialize_dyn_split_RK2b(u, v, h, tv, uh, vh, eta, Time, G, GV, US,
13051305
type(porous_barrier_type), intent(in) :: pbv !< porous barrier fractional cell metrics
13061306
integer, intent(out) :: cont_stencil !< The stencil for thickness
13071307
!! from the continuity solver.
1308+
integer, intent(out) :: dyn_h_stencil !< The stencil for thickness for the
1309+
!! dynamics based on the continuity
1310+
!! solver and Coriolis scheme.
13081311

13091312
! local variables
13101313
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_tmp ! A temporary copy of the layer thicknesses [H ~> m or kg m-2]
@@ -1451,6 +1454,7 @@ subroutine initialize_dyn_split_RK2b(u, v, h, tv, uh, vh, eta, Time, G, GV, US,
14511454
call continuity_init(Time, G, GV, US, param_file, diag, CS%continuity_CSp)
14521455
cont_stencil = continuity_stencil(CS%continuity_CSp)
14531456
call CoriolisAdv_init(Time, G, GV, US, param_file, diag, CS%ADp, CS%CoriolisAdv)
1457+
dyn_h_stencil = max(cont_stencil, CoriolisAdv_stencil(CS%CoriolisAdv))
14541458
if (CS%calculate_SAL) call SAL_init(h, tv, G, GV, US, param_file, CS%SAL_CSp, restart_CS)
14551459
if (CS%use_tides) then
14561460
call tidal_forcing_init(Time, G, US, param_file, CS%tides_CSp, CS%HA_CSp)

src/core/MOM_dynamics_unsplit.F90

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
277277
call cpu_clock_begin(id_clock_continuity)
278278
call continuity(u, v, h, hp, uh, vh, dt*0.5, G, GV, US, CS%continuity_CSp, CS%OBC, pbv)
279279
call cpu_clock_end(id_clock_continuity)
280-
if (cor_stencil > 2) then
281-
call pass_var(hp, G%Domain, halo=cor_stencil, clock=id_clock_pass)
282-
call pass_var(h, G%Domain, halo=cor_stencil, clock=id_clock_pass)
283-
else
284-
call pass_var(hp, G%Domain, clock=id_clock_pass)
285-
endif
280+
call pass_var(hp, G%Domain, clock=id_clock_pass)
286281
call pass_vector(uh, vh, G%Domain, clock=id_clock_pass)
287282

288283
call enable_averages(0.5*dt, Time_local-real_to_time(0.5*US%T_to_s*dt), CS%diag)
@@ -312,11 +307,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
312307
enddo ; enddo
313308
enddo
314309
call cpu_clock_end(id_clock_mom_update)
315-
if (cor_stencil > 2) then
316-
call pass_vector(u, v, G%Domain, halo=cor_stencil, clock=id_clock_pass)
317-
else
318-
call pass_vector(u, v, G%Domain, clock=id_clock_pass)
319-
endif
310+
call pass_vector(u, v, G%Domain, clock=id_clock_pass)
320311

321312
! CAu = -(f+zeta)/h_av vh + d/dx KE
322313
call cpu_clock_begin(id_clock_Cor)
@@ -377,12 +368,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
377368
call cpu_clock_begin(id_clock_continuity)
378369
call continuity(up, vp, hp, h_av, uh, vh, (0.5*dt), G, GV, US, CS%continuity_CSp, CS%OBC, pbv)
379370
call cpu_clock_end(id_clock_continuity)
380-
if (cor_stencil > 2) then
381-
call pass_var(h_av, G%Domain, halo=cor_stencil, clock=id_clock_pass)
382-
call pass_vector(up, vp, G%Domain, halo=cor_stencil, clock=id_clock_pass)
383-
else
384-
call pass_var(h_av, G%Domain, clock=id_clock_pass)
385-
endif
371+
call pass_var(h_av, G%Domain, clock=id_clock_pass)
386372
call pass_vector(uh, vh, G%Domain, clock=id_clock_pass)
387373

388374
! h_av <- (hp + h_av)/2
@@ -443,12 +429,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
443429
call cpu_clock_begin(id_clock_continuity)
444430
call continuity(upp, vpp, hp, h, uh, vh, (dt*0.5), G, GV, US, CS%continuity_CSp, CS%OBC, pbv)
445431
call cpu_clock_end(id_clock_continuity)
446-
if (cor_stencil > 2) then
447-
call pass_var(h, G%Domain, halo=cor_stencil, clock=id_clock_pass)
448-
call pass_vector(upp, vpp, G%Domain, halo=cor_stencil, clock=id_clock_pass)
449-
else
450-
call pass_var(h, G%Domain, clock=id_clock_pass)
451-
endif
432+
call pass_var(h, G%Domain, clock=id_clock_pass)
452433
call pass_vector(uh, vh, G%Domain, clock=id_clock_pass)
453434
! Whenever thickness changes let the diag manager know, target grids
454435
! for vertical remapping may need to be regenerated.
@@ -600,7 +581,7 @@ end subroutine register_restarts_dyn_unsplit
600581
subroutine initialize_dyn_unsplit(u, v, h, tv, Time, G, GV, US, param_file, diag, CS, &
601582
Accel_diag, Cont_diag, MIS, &
602583
OBC, update_OBC_CSp, ALE_CSp, set_visc, &
603-
visc, dirs, ntrunc, cont_stencil)
584+
visc, dirs, ntrunc, cont_stencil, dyn_h_stencil)
604585
type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure.
605586
type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
606587
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
@@ -645,7 +626,10 @@ subroutine initialize_dyn_unsplit(u, v, h, tv, Time, G, GV, US, param_file, diag
645626
!! records the number of times the velocity
646627
!! is truncated (this should be 0).
647628
integer, intent(out) :: cont_stencil !< The stencil for thickness
648-
!! from the continuity solver.
629+
!! from the continuity solver.
630+
integer, intent(out) :: dyn_h_stencil !< The stencil for thickness
631+
!! for the dynamics based on the
632+
!! continuity solver and Coriolis scheme.
649633

650634
! This subroutine initializes all of the variables that are used by this
651635
! dynamic core, including diagnostics and the cpu clocks.
@@ -702,6 +686,7 @@ subroutine initialize_dyn_unsplit(u, v, h, tv, Time, G, GV, US, param_file, diag
702686
call continuity_init(Time, G, GV, US, param_file, diag, CS%continuity_CSp)
703687
cont_stencil = continuity_stencil(CS%continuity_CSp)
704688
call CoriolisAdv_init(Time, G, GV, US, param_file, diag, CS%ADp, CS%CoriolisAdv)
689+
dyn_h_stencil = max(cont_stencil, CoriolisAdv_stencil(CS%CoriolisAdv))
705690
if (CS%calculate_SAL) call SAL_init(h, tv, G, GV, US, param_file, CS%SAL_CSp)
706691
if (CS%use_tides) call tidal_forcing_init(Time, G, US, param_file, CS%tides_CSp)
707692
call PressureForce_init(Time, G, GV, US, param_file, diag, CS%PressureForce_CSp, CS%ADp, &

0 commit comments

Comments
 (0)