Skip to content

Commit fccc22b

Browse files
committed
* Fix for spatially varying Bodner fields.
- Without this, one can see the tile boundaries in the uhml and vhml fields.
1 parent 9b45087 commit fccc22b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/parameterizations/lateral/MOM_mixed_layer_restrat.F90

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,8 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
10641064
h_big = 0.5*( big_H(i,j) + big_H(i+1,j) ) ! H ~> m or kg m-3
10651065
grd_b = ( buoy_av(i+1,j) - buoy_av(i,j) ) * G%IdxCu(I,j) ! L H-1 T-2 ~> s-2 or m3 kg-1 s-2
10661066
r_wpup = 2. / ( wpup(i,j) + wpup(i+1,j) ) ! T2 L-1 H-1 ~> s2 m-2 or m s2 kg-1
1067-
psi_mag = ( ( ( CS%Cr_space(i,j) * grid_dsd ) * ( absf * h_sml ) ) & ! L2 H T-1 ~> m3 s-1 or kg s-1
1068-
* ( ( h_big**2 ) * grd_b ) ) * r_wpup
1067+
psi_mag = ( ( ( (0.5*(CS%Cr_space(i,j) + CS%Cr_space(i+1,j))) * grid_dsd ) & ! L2 H T-1 ~> m3 s-1 or kg s-1
1068+
* ( absf * h_sml ) ) * ( ( h_big**2 ) * grd_b ) ) * r_wpup
10691069
else ! There is no flux on land and no gradient at open boundary points.
10701070
psi_mag = 0.0
10711071
endif
@@ -1105,8 +1105,8 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
11051105
h_big = 0.5*( big_H(i,j) + big_H(i,j+1) ) ! H ~> m or kg m-3
11061106
grd_b = ( buoy_av(i,j+1) - buoy_av(i,j) ) * G%IdyCv(I,j) ! L H-1 T-2 ~> s-2 or m3 kg-1 s-2
11071107
r_wpup = 2. / ( wpup(i,j) + wpup(i,j+1) ) ! T2 L-1 H-1 ~> s2 m-2 or m s2 kg-1
1108-
psi_mag = ( ( ( CS%Cr_space(i,j) * grid_dsd ) * ( absf * h_sml ) ) & ! L2 H T-1 ~> m3 s-1 or kg s-1
1109-
* ( ( h_big**2 ) * grd_b ) ) * r_wpup
1108+
psi_mag = ( ( ( (0.5*(CS%Cr_space(i,j) + CS%Cr_space(i,j+1))) * grid_dsd ) & ! L2 H T-1 ~> m3 s-1 or kg s-1
1109+
* ( absf * h_sml ) ) * ( ( h_big**2 ) * grd_b ) ) * r_wpup
11101110
else ! There is no flux on land and no gradient at open boundary points.
11111111
psi_mag = 0.0
11121112
endif
@@ -1670,6 +1670,7 @@ logical function mixedlayer_restrat_init(Time, G, GV, US, param_file, diag, CS,
16701670
filename = trim(inputdir) // "/" // trim(filename)
16711671
allocate(CS%MLD_Tfilt_space(G%isd:G%ied,G%jsd:G%jed), source=0.0)
16721672
call MOM_read_data(filename, varname, CS%MLD_Tfilt_space, G%domain, scale=US%s_to_T)
1673+
call pass_var(CS%MLD_Tfilt_space, G%domain)
16731674
endif
16741675
allocate(CS%Cr_space(G%isd:G%ied,G%jsd:G%jed), source=CS%Cr)
16751676
if (CS%Cr_grid) then
@@ -1681,6 +1682,7 @@ logical function mixedlayer_restrat_init(Time, G, GV, US, param_file, diag, CS,
16811682
default="Cr")
16821683
filename = trim(inputdir) // "/" // trim(filename)
16831684
call MOM_read_data(filename, varname, CS%Cr_space, G%domain)
1685+
call pass_var(CS%Cr_space, G%domain)
16841686
endif
16851687
call closeParameterBlock(param_file) ! The remaining parameters do not have MLE% prepended
16861688
call get_param(param_file, mdl, "MLE_USE_PBL_MLD", CS%MLE_use_PBL_MLD, &

0 commit comments

Comments
 (0)