@@ -6,6 +6,7 @@ module MOM_lateral_boundary_mixing
6
6
7
7
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
8
8
use MOM_cpu_clock, only : CLOCK_MODULE, CLOCK_ROUTINE
9
+ use MOM_domains, only : pass_var
9
10
use MOM_diag_mediator, only : diag_ctrl, time_type
10
11
use MOM_diag_mediator, only : post_data, register_diag_field
11
12
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)
142
143
if (ASSOCIATED (CS% KPP_CSp)) call KPP_get_BLD(CS% KPP_CSp, hbl, G)
143
144
if (ASSOCIATED (CS% energetic_PBL_CSp)) call energetic_PBL_get_MLD(CS% energetic_PBL_CSp, hbl, G, US)
144
145
146
+ call pass_var(hbl,G% Domain)
147
+
145
148
do m = 1 ,Reg% ntr
146
149
tracer = > Reg% tr(m)
147
150
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)
154
157
! Diffusive fluxes in the i-direction
155
158
uFlx(:,:,:) = 0 .
156
159
vFlx(:,:,:) = 0 .
160
+ uFlx_bulk(:,:) = 0 .
161
+ vFlx_bulk(:,:) = 0 .
157
162
if ( CS% method == 1 ) then
158
163
do j= G% jsc,G% jec
159
164
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)
183
188
enddo ; enddo ; enddo
184
189
185
190
! 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)
190
195
191
196
enddo
192
197
0 commit comments