Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_mixed_layer_restrat.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
!$OMP default(shared) &
!$OMP private(i, j, k, keep_going, line_is_empty, dh, &
!$OMP grid_dsd, absf, h_sml, h_big, grd_b, r_wpup, psi_mag, IhTot, &
!$OMP sigint, muzb, muza, hAtVel, Rml_int, SpV_int)
!$OMP sigint, muzb, muza, hAtVel, Rml_int, SpV_int, rho_ml, SpV_ml, dmu )

!$OMP do
do j=js-1,je+1
Expand Down Expand Up @@ -1779,7 +1779,7 @@ logical function mixedlayer_restrat_init(Time, G, GV, US, param_file, diag, CS,
"The variable name for Cr field.", &
default="Cr")
filename = trim(inputdir) // "/" // trim(filename)
call MOM_read_data(filename, varname, CS%Cr_space, G%domain)
call MOM_read_data(filename, varname, CS%Cr_space, G%domain, scale=1.0)
call pass_var(CS%Cr_space, G%domain)
endif
call closeParameterBlock(param_file) ! The remaining parameters do not have MLE% prepended
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ subroutine diabatic_ALE(u, v, h, tv, BLD, fluxes, visc, ADp, CDp, dt, Time_end,
! If visc%MLD or visc%h_ML exist, copy KPP's BLD into them with appropriate conversions.
if (associated(visc%h_ML)) call convert_MLD_to_ML_thickness(BLD, h, visc%h_ML, tv, G, GV)
if (associated(visc%MLD)) visc%MLD(:,:) = BLD(:,:)
if (associated(visc%sfc_buoy_flx)) visc%sfc_buoy_flx(:,:) = KPP_buoy_flux(:,:,1)
if (associated(visc%sfc_buoy_flx)) visc%sfc_buoy_flx(:,:) = KPP_buoy_flux(:,:,1) * US%L_to_Z**2

if (showCallTree) call callTree_waypoint("done with KPP_calculate (diabatic)")
if (CS%debug) then
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_set_viscosity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2799,12 +2799,12 @@ subroutine set_visc_register_restarts(HI, G, GV, US, param_file, visc, restart_C
call safe_alloc_ptr(visc%h_ML, isd, ied, jsd, jed)
endif

if (MLE_use_PBL_MLD) then
if (MLE_use_PBL_MLD .or. MLE_use_Bodner) then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be MLE_use_PBL_MLD .and. MLE_use_Bodner? I do not think we need to save MLD if MLE_use_Bodner = True and MLE_use_PBL_MLD = False.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In mixedlayer_restrat_Bodner subroutine, BLD (MLD) and h_MLD is needed regardless of MLE_use_PBL_MLD. Hence, the .or. clause.

call register_restart_field(visc%MLD, "MLD", .false., restart_CS, &
"Instantaneous active mixing layer depth", units="m", conversion=US%Z_to_m)
endif
if (MLE_use_PBL_MLD .or. do_brine_plume .or. use_fpmix .or. &
use_neutral_diffusion .or. use_hor_bnd_diff) then
use_neutral_diffusion .or. use_hor_bnd_diff .or. MLE_use_Bodner) then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Do we need to save h_ML even when MLE_use_PBL_MLD = False?
If not, it might make more sense to have:
... .or. use_hor_bnd_diff .or. (MLE_use_Bodner .and. MLE_use_PBL_MLD)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, h_MLD is needed by mixedlayer_restrat_Bodner regardless of MLE_use_PBL_MLD.

call register_restart_field(visc%h_ML, "h_ML", .false., restart_CS, &
"Instantaneous active mixing layer thickness", &
units=get_thickness_units(GV), conversion=GV%H_to_mks)
Expand Down