Skip to content

Commit f6800c2

Browse files
author
Andrew Shao
committed
Update halos for hbl in LBM
The get_MLD and get_BLD routines only return boundary layer depths on the T-grid's computational domain leading to striping when calculating the LBM fluxes. Adding a halo update for this variable fixes the problem
1 parent 915bcb1 commit f6800c2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/tracer/MOM_lateral_boundary_mixing.F90

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module MOM_lateral_boundary_mixing
66

77
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
88
use MOM_cpu_clock, only : CLOCK_MODULE, CLOCK_ROUTINE
9+
use MOM_domains, only : pass_var
910
use MOM_diag_mediator, only : diag_ctrl, time_type
1011
use MOM_diag_mediator, only : post_data, register_diag_field
1112
use MOM_error_handler, only : MOM_error, FATAL, WARNING, MOM_mesg, is_root_pe
@@ -142,6 +143,8 @@ subroutine lateral_boundary_mixing(G, GV, US, h, Coef_x, Coef_y, dt, Reg, CS)
142143
if (ASSOCIATED(CS%KPP_CSp)) call KPP_get_BLD(CS%KPP_CSp, hbl, G)
143144
if (ASSOCIATED(CS%energetic_PBL_CSp)) call energetic_PBL_get_MLD(CS%energetic_PBL_CSp, hbl, G, US)
144145

146+
call pass_var(hbl,G%Domain)
147+
145148
do m = 1,Reg%ntr
146149
tracer => Reg%tr(m)
147150
do j = G%jsc-1, G%jec+1
@@ -154,6 +157,8 @@ subroutine lateral_boundary_mixing(G, GV, US, h, Coef_x, Coef_y, dt, Reg, CS)
154157
! Diffusive fluxes in the i-direction
155158
uFlx(:,:,:) = 0.
156159
vFlx(:,:,:) = 0.
160+
uFlx_bulk(:,:) = 0.
161+
vFlx_bulk(:,:) = 0.
157162
if ( CS%method == 1 ) then
158163
do j=G%jsc,G%jec
159164
do i=G%isc-1,G%iec
@@ -183,10 +188,10 @@ subroutine lateral_boundary_mixing(G, GV, US, h, Coef_x, Coef_y, dt, Reg, CS)
183188
enddo ; enddo ; enddo
184189

185190
! Post the tracer diagnostics
186-
if (tracer%id_lbm_bulk_dfx>0) call post_data(tracer%id_lbm_bulk_dfx, uFlx_bulk, CS%diag)
187-
if (tracer%id_lbm_bulk_dfy>0) call post_data(tracer%id_lbm_bulk_dfy, vFlx_bulk, CS%diag)
188-
if (tracer%id_lbm_dfx>0) call post_data(tracer%id_lbm_dfx, uFlx, CS%diag)
189-
if (tracer%id_lbm_dfy>0) call post_data(tracer%id_lbm_dfy, vFlx, CS%diag)
191+
if (tracer%id_lbm_bulk_dfx>0) call post_data(tracer%id_lbm_bulk_dfx, uFlx_bulk, CS%diag)
192+
if (tracer%id_lbm_bulk_dfy>0) call post_data(tracer%id_lbm_bulk_dfy, vFlx_bulk, CS%diag)
193+
if (tracer%id_lbm_dfx>0) call post_data(tracer%id_lbm_dfx, uFlx, CS%diag)
194+
if (tracer%id_lbm_dfy>0) call post_data(tracer%id_lbm_dfy, vFlx, CS%diag)
190195

191196
enddo
192197

0 commit comments

Comments
 (0)