Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c605fe

Browse files
Hallberg-NOAAmarshallward
authored andcommitted
(*)Internal thickness variable unit correction
Changed the internal units of several internal thickness variables in ePBL_column and of some temporary diagnostics in MOM_bulk_mixed_layer from [Z] to [H] to reduce the number of rescaling factors that are being applied outside of the conversion factors when diagnostics are registered. All answers and output are bitwise identical in the MOM6-examples test suite, although in some cases where ePBL is used with a non-Boussinesq model, there may be answers at roundoff. I wanted to make this change now before any such models exist.
1 parent 4bcc849 commit 8c605fe

4 files changed

Lines changed: 61 additions & 58 deletions

File tree

src/parameterizations/vertical/MOM_bulk_mixed_layer.F90

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
230230
integer, dimension(SZI_(G),SZK_(GV)) :: &
231231
ksort ! The sorted k-index that each original layer goes to.
232232
real, dimension(SZI_(G),SZJ_(G)) :: &
233-
h_miss ! The summed absolute mismatch [Z ~> m].
233+
h_miss ! The summed absolute mismatch [H ~> m or kg m-2].
234234
real, dimension(SZI_(G)) :: &
235235
TKE, & ! The turbulent kinetic energy available for mixing over a
236236
! time step [Z L2 T-2 ~> m3 s-2].
@@ -299,12 +299,12 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
299299
! adjustment [Z L2 T-2 ~> m3 s-2].
300300
real, dimension(SZI_(G),SZJ_(G)) :: &
301301
Hsfc_max, & ! The thickness of the surface region (mixed and buffer layers)
302-
! after entrainment but before any buffer layer detrainment [Z ~> m].
302+
! after entrainment but before any buffer layer detrainment [H ~> m or kg m-2].
303303
Hsfc_used, & ! The thickness of the surface region after buffer layer
304-
! detrainment [Z ~> m].
304+
! detrainment [H ~> m or kg m-2].
305305
Hsfc_min, & ! The minimum thickness of the surface region based on the
306306
! new mixed layer depth and the previous thickness of the
307-
! neighboring water columns [Z ~> m].
307+
! neighboring water columns [H ~> m or kg m-2].
308308
h_sum, & ! The total thickness of the water column [H ~> m or kg m-2].
309309
hmbl_prev ! The previous thickness of the mixed and buffer layers [H ~> m or kg m-2].
310310
real, dimension(SZI_(G)) :: &
@@ -538,7 +538,7 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
538538
h(i,0) = htot(i)
539539
endif ; enddo
540540
if (write_diags .and. allocated(CS%ML_depth)) then ; do i=is,ie
541-
CS%ML_depth(i,j) = h(i,0) * GV%H_to_m ! Rescale the diagnostic.
541+
CS%ML_depth(i,j) = h(i,0) ! Store the diagnostic.
542542
enddo ; endif
543543
if (associated(Hml)) then ; do i=is,ie
544544
Hml(i,j) = G%mask2dT(i,j) * (h(i,0) * GV%H_to_Z) ! Rescale the diagnostic for output.
@@ -573,14 +573,14 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
573573
hmbl_prev(i,j-1) - dHD*min(h_sum(i,j),h_sum(i,j-1)), &
574574
hmbl_prev(i,j+1) - dHD*min(h_sum(i,j),h_sum(i,j+1))) )
575575

576-
Hsfc_min(i,j) = GV%H_to_Z * max(h(i,0), min(Hsfc(i), H_nbr))
576+
Hsfc_min(i,j) = max(h(i,0), min(Hsfc(i), H_nbr))
577577

578578
if (CS%limit_det) max_BL_det(i) = max(0.0, Hsfc(i)-H_nbr)
579579
enddo
580580
endif
581581

582582
if (CS%id_Hsfc_max > 0) then ; do i=is,ie
583-
Hsfc_max(i,j) = GV%H_to_Z * Hsfc(i)
583+
Hsfc_max(i,j) = Hsfc(i)
584584
enddo ; endif
585585
endif
586586

@@ -601,9 +601,9 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
601601
endif
602602

603603
if (CS%id_Hsfc_used > 0) then
604-
do i=is,ie ; Hsfc_used(i,j) = GV%H_to_Z * h(i,0) ; enddo
604+
do i=is,ie ; Hsfc_used(i,j) = h(i,0) ; enddo
605605
do k=CS%nkml+1,nkmb ; do i=is,ie
606-
Hsfc_used(i,j) = Hsfc_used(i,j) + GV%H_to_Z * h(i,k)
606+
Hsfc_used(i,j) = Hsfc_used(i,j) + h(i,k)
607607
enddo ; enddo
608608
endif
609609

@@ -686,15 +686,15 @@ subroutine bulkmixedlayer(h_3d, u_3d, v_3d, tv, fluxes, dt, ea, eb, G, GV, US, C
686686

687687
if (CS%id_h_mismatch > 0) then
688688
do i=is,ie
689-
h_miss(i,j) = GV%H_to_Z * abs(h_3d(i,j,1) - (h_orig(i,1) + &
689+
h_miss(i,j) = abs(h_3d(i,j,1) - (h_orig(i,1) + &
690690
(eaml(i,1) + (ebml(i,1) - eaml(i,1+1)))))
691691
enddo
692692
do k=2,nz-1 ; do i=is,ie
693-
h_miss(i,j) = h_miss(i,j) + GV%H_to_Z * abs(h_3d(i,j,k) - (h_orig(i,k) + &
693+
h_miss(i,j) = h_miss(i,j) + abs(h_3d(i,j,k) - (h_orig(i,k) + &
694694
((eaml(i,k) - ebml(i,k-1)) + (ebml(i,k) - eaml(i,k+1)))))
695695
enddo ; enddo
696696
do i=is,ie
697-
h_miss(i,j) = h_miss(i,j) + GV%H_to_Z * abs(h_3d(i,j,nz) - (h_orig(i,nz) + &
697+
h_miss(i,j) = h_miss(i,j) + abs(h_3d(i,j,nz) - (h_orig(i,nz) + &
698698
((eaml(i,nz) - ebml(i,nz-1)) + ebml(i,nz))))
699699
enddo
700700
endif
@@ -3501,7 +3501,7 @@ subroutine bulkmixedlayer_init(Time, G, GV, US, param_file, diag, CS)
35013501
"during mixedlayer convection.", default=.false.)
35023502

35033503
CS%id_ML_depth = register_diag_field('ocean_model', 'h_ML', diag%axesT1, &
3504-
Time, 'Surface mixed layer depth', 'm')
3504+
Time, 'Surface mixed layer depth', 'm', conversion=GV%H_to_m)
35053505
CS%id_TKE_wind = register_diag_field('ocean_model', 'TKE_wind', diag%axesT1, &
35063506
Time, 'Wind-stirring source of mixed layer TKE', &
35073507
'm3 s-3', conversion=US%Z_to_m*(US%L_to_m**2)*(US%s_to_T**3))
@@ -3533,13 +3533,13 @@ subroutine bulkmixedlayer_init(Time, G, GV, US, param_file, diag, CS)
35333533
Time, 'Spurious source of potential energy from mixed layer only detrainment', &
35343534
'W m-2', conversion=US%RZ3_T3_to_W_m2*US%L_to_Z**2)
35353535
CS%id_h_mismatch = register_diag_field('ocean_model', 'h_miss_ML', diag%axesT1, &
3536-
Time, 'Summed absolute mismatch in entrainment terms', 'm', conversion=US%Z_to_m)
3536+
Time, 'Summed absolute mismatch in entrainment terms', 'm', conversion=GV%H_to_m)
35373537
CS%id_Hsfc_used = register_diag_field('ocean_model', 'Hs_used', diag%axesT1, &
3538-
Time, 'Surface region thickness that is used', 'm', conversion=US%Z_to_m)
3538+
Time, 'Surface region thickness that is used', 'm', conversion=GV%H_to_m)
35393539
CS%id_Hsfc_max = register_diag_field('ocean_model', 'Hs_max', diag%axesT1, &
3540-
Time, 'Maximum surface region thickness', 'm', conversion=US%Z_to_m)
3540+
Time, 'Maximum surface region thickness', 'm', conversion=GV%H_to_m)
35413541
CS%id_Hsfc_min = register_diag_field('ocean_model', 'Hs_min', diag%axesT1, &
3542-
Time, 'Minimum surface region thickness', 'm', conversion=US%Z_to_m)
3542+
Time, 'Minimum surface region thickness', 'm', conversion=GV%H_to_m)
35433543
!CS%lim_det_dH_sfc = 0.5 ; CS%lim_det_dH_bathy = 0.2 ! Technically these should not get used if limit_det is false?
35443544
if (CS%limit_det .or. (CS%id_Hsfc_min > 0)) then
35453545
call get_param(param_file, mdl, "LIMIT_BUFFER_DET_DH_SFC", CS%lim_det_dH_sfc, &

src/parameterizations/vertical/MOM_diapyc_energy_req.F90

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,8 @@ subroutine find_PE_chg(Kddt_h0, dKddt_h, hp_a, hp_b, Th_a, Sh_a, Th_b, Sh_b, &
10461046
real :: ColHt_core ! The diffusivity-independent core term in the expressions
10471047
! for the column height changes [R L2 T-2 ~> J m-3].
10481048
real :: ColHt_chg ! The change in the column height [Z ~> m].
1049-
real :: y1 ! A local temporary term, in [H-3] or [H-4] in various contexts.
1049+
real :: y1_3 ! A local temporary term in [H-3 ~> m-3 or m6 kg-3].
1050+
real :: y1_4 ! A local temporary term in [H-4 ~> m-4 or m8 kg-4].
10501051

10511052
! The expression for the change in potential energy used here is derived
10521053
! from the expression for the final estimates of the changes in temperature
@@ -1068,37 +1069,37 @@ subroutine find_PE_chg(Kddt_h0, dKddt_h, hp_a, hp_b, Th_a, Sh_a, Th_b, Sh_b, &
10681069
if (present(PE_chg)) then
10691070
! Find the change in column potential energy due to the change in the
10701071
! diffusivity at this interface by dKddt_h.
1071-
y1 = dKddt_h / (bdt1 * (bdt1 + dKddt_h * hps))
1072-
PE_chg = PEc_core * y1
1073-
ColHt_chg = ColHt_core * y1
1072+
y1_3 = dKddt_h / (bdt1 * (bdt1 + dKddt_h * hps))
1073+
PE_chg = PEc_core * y1_3
1074+
ColHt_chg = ColHt_core * y1_3
10741075
if (ColHt_chg < 0.0) PE_chg = PE_chg - pres_Z * ColHt_chg
10751076
if (present(ColHt_cor)) ColHt_cor = -pres_Z * min(ColHt_chg, 0.0)
10761077
elseif (present(ColHt_cor)) then
1077-
y1 = dKddt_h / (bdt1 * (bdt1 + dKddt_h * hps))
1078-
ColHt_cor = -pres_Z * min(ColHt_core * y1, 0.0)
1078+
y1_3 = dKddt_h / (bdt1 * (bdt1 + dKddt_h * hps))
1079+
ColHt_cor = -pres_Z * min(ColHt_core * y1_3, 0.0)
10791080
endif
10801081

10811082
if (present(dPEc_dKd)) then
10821083
! Find the derivative of the potential energy change with dKddt_h.
1083-
y1 = 1.0 / (bdt1 + dKddt_h * hps)**2
1084-
dPEc_dKd = PEc_core * y1
1085-
ColHt_chg = ColHt_core * y1
1084+
y1_4 = 1.0 / (bdt1 + dKddt_h * hps)**2
1085+
dPEc_dKd = PEc_core * y1_4
1086+
ColHt_chg = ColHt_core * y1_4
10861087
if (ColHt_chg < 0.0) dPEc_dKd = dPEc_dKd - pres_Z * ColHt_chg
10871088
endif
10881089

10891090
if (present(dPE_max)) then
10901091
! This expression is the limit of PE_chg for infinite dKddt_h.
1091-
y1 = 1.0 / (bdt1 * hps)
1092-
dPE_max = PEc_core * y1
1093-
ColHt_chg = ColHt_core * y1
1092+
y1_3 = 1.0 / (bdt1 * hps)
1093+
dPE_max = PEc_core * y1_3
1094+
ColHt_chg = ColHt_core * y1_3
10941095
if (ColHt_chg < 0.0) dPE_max = dPE_max - pres_Z * ColHt_chg
10951096
endif
10961097

10971098
if (present(dPEc_dKd_0)) then
10981099
! This expression is the limit of dPEc_dKd for dKddt_h = 0.
1099-
y1 = 1.0 / bdt1**2
1100-
dPEc_dKd_0 = PEc_core * y1
1101-
ColHt_chg = ColHt_core * y1
1100+
y1_4 = 1.0 / bdt1**2
1101+
dPEc_dKd_0 = PEc_core * y1_4
1102+
ColHt_chg = ColHt_core * y1_4
11021103
if (ColHt_chg < 0.0) dPEc_dKd_0 = dPEc_dKd_0 - pres_Z * ColHt_chg
11031104
endif
11041105

src/parameterizations/vertical/MOM_energetic_PBL.F90

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module MOM_energetic_PBL
7676
!! boundary layer thickness. The default is 0, but a
7777
!! value of 0.1 might be better justified by observations.
7878
real :: MLD_tol !< A tolerance for determining the boundary layer thickness when
79-
!! Use_MLD_iteration is true [Z ~> m].
79+
!! Use_MLD_iteration is true [H ~> m or kg m-2].
8080
real :: min_mix_len !< The minimum mixing length scale that will be used by ePBL [Z ~> m].
8181
!! The default (0) does not set a minimum.
8282

@@ -634,9 +634,9 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
634634
real :: dt_h ! The timestep divided by the averages of the thicknesses around
635635
! a layer, times a thickness conversion factor [H T Z-2 ~> s m-1 or kg s m-4].
636636
real :: h_bot ! The distance from the bottom [H ~> m or kg m-2].
637-
real :: h_rsum ! The running sum of h from the top [Z ~> m].
637+
real :: h_rsum ! The running sum of h from the top [H ~> m or kg m-2].
638638
real :: I_hs ! The inverse of h_sum [H-1 ~> m-1 or m2 kg-1].
639-
real :: I_MLD ! The inverse of the current value of MLD [Z-1 ~> m-1].
639+
real :: I_MLD ! The inverse of the current value of MLD [H-1 ~> m-1 or m2 kg-1].
640640
real :: h_tt ! The distance from the surface or up to the next interface
641641
! that did not exhibit turbulent mixing from this scheme plus
642642
! a surface mixing roughness length given by h_tt_min [H ~> m or kg m-2].
@@ -648,7 +648,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
648648
real :: vstar ! An in-situ turbulent velocity [Z T-1 ~> m s-1].
649649
real :: mstar_total ! The value of mstar used in ePBL [nondim]
650650
real :: mstar_LT ! An addition to mstar due to Langmuir turbulence [nondim] (output for diagnostic)
651-
real :: MLD_output ! The mixed layer depth output from this routine [Z ~> m].
651+
real :: MLD_output ! The mixed layer depth output from this routine [H ~> m or kg m-2].
652652
real :: LA ! The value of the Langmuir number [nondim]
653653
real :: LAmod ! The modified Langmuir number by convection [nondim]
654654
real :: hbs_here ! The local minimum of hb_hs and MixLen_shape, times a
@@ -706,8 +706,9 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
706706
!----------------------------------------------------------------------
707707
!/BGR added Aug24,2016 for adding iteration to get boundary layer depth
708708
! - needed to compute new mixing length.
709-
real :: MLD_guess, MLD_found ! Mixing Layer depth guessed/found for iteration [Z ~> m].
710-
real :: min_MLD ! Iteration bounds [Z ~> m], which are adjusted at each step
709+
real :: MLD_guess, MLD_found ! Mixing Layer depth guessed/found for iteration [H ~> m or kg m-2].
710+
real :: MLD_guess_Z ! A guessed mixed layer depth, converted to height units [Z ~> m]
711+
real :: min_MLD ! Iteration bounds [H ~> m or kg m-2], which are adjusted at each step
711712
real :: max_MLD ! - These are initialized based on surface/bottom
712713
! 1. The iteration guesses a value (possibly from prev step or neighbor).
713714
! 2. The iteration checks if value is converged, too shallow, or too deep.
@@ -720,8 +721,8 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
720721
! manner giving a usable guess. When it does fail, it is due to convection
721722
! within the boundary layer. Likely, a new method e.g. surface_disconnect,
722723
! can improve this.
723-
real :: dMLD_min ! The change in diagnosed mixed layer depth when the guess is min_MLD [Z ~> m]
724-
real :: dMLD_max ! The change in diagnosed mixed layer depth when the guess is max_MLD [Z ~> m]
724+
real :: dMLD_min ! The change in diagnosed mixed layer depth when the guess is min_MLD [H ~> m or kg m-2]
725+
real :: dMLD_max ! The change in diagnosed mixed layer depth when the guess is max_MLD [H ~> m or kg m-2]
725726
logical :: OBL_converged ! Flag for convergence of MLD
726727
integer :: OBL_it ! Iteration counter
727728

@@ -754,7 +755,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
754755
I_dtrho = 0.0 ; if (dt*GV%Rho0 > 0.0) I_dtrho = (US%Z_to_m**3*US%s_to_T**3) / (dt*GV%Rho0)
755756
vstar_unit_scale = US%m_to_Z * US%T_to_s
756757

757-
MLD_guess = MLD_io
758+
MLD_guess = MLD_io*GV%Z_to_H
758759

759760
! Determine the initial mech_TKE and conv_PErel, including the energy required
760761
! to mix surface heating through the topmost cell, the energy released by mixing
@@ -787,15 +788,15 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
787788
hb_hs(K) = h_bot * I_hs
788789
enddo
789790

790-
MLD_output = h(1)*GV%H_to_Z
791+
MLD_output = h(1)
791792

792793
!/The following lines are for the iteration over MLD
793794
! max_MLD will initialized as ocean bottom depth
794-
max_MLD = 0.0 ; do k=1,nz ; max_MLD = max_MLD + h(k)*GV%H_to_Z ; enddo
795+
max_MLD = 0.0 ; do k=1,nz ; max_MLD = max_MLD + h(k) ; enddo
795796
! min_MLD will be initialized to 0.
796797
min_MLD = 0.0
797798
! Set values of the wrong signs to indicate that these changes are not based on valid estimates
798-
dMLD_min = -1.0*US%m_to_Z ; dMLD_max = 1.0*US%m_to_Z
799+
dMLD_min = -1.0*GV%m_to_H ; dMLD_max = 1.0*GV%m_to_H
799800

800801
! If no first guess is provided for MLD, try the middle of the water column
801802
if (MLD_guess <= min_MLD) MLD_guess = 0.5 * (min_MLD + max_MLD)
@@ -811,18 +812,19 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
811812
if (debug) then ; mech_TKE_k(:) = 0.0 ; conv_PErel_k(:) = 0.0 ; endif
812813

813814
! Reset ML_depth
814-
MLD_output = h(1)*GV%H_to_Z
815+
MLD_output = h(1)
815816
sfc_connected = .true.
816817

817818
!/ Here we get MStar, which is the ratio of convective TKE driven mixing to UStar**3
819+
MLD_guess_z = GV%H_to_Z*MLD_guess ! Convert MLD from thickness to height coordinates for these calls
818820
if (CS%Use_LT) then
819-
call get_Langmuir_Number(LA, G, GV, US, abs(MLD_guess), u_star_mean, i, j, h, Waves, &
821+
call get_Langmuir_Number(LA, G, GV, US, abs(MLD_guess_z), u_star_mean, i, j, h, Waves, &
820822
U_H=u, V_H=v)
821-
call find_mstar(CS, US, B_flux, u_star, u_star_Mean, MLD_Guess, absf, &
823+
call find_mstar(CS, US, B_flux, u_star, u_star_Mean, MLD_guess_z, absf, &
822824
MStar_total, Langmuir_Number=La, Convect_Langmuir_Number=LAmod,&
823825
mstar_LT=mstar_LT)
824826
else
825-
call find_mstar(CS, US, B_flux, u_star, u_star_mean, MLD_guess, absf, mstar_total)
827+
call find_mstar(CS, US, B_flux, u_star, u_star_mean, MLD_guess_z, absf, mstar_total)
826828
endif
827829

828830
!/ Apply MStar to get mech_TKE
@@ -879,7 +881,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
879881
h_rsum = 0.0
880882
MixLen_shape(1) = 1.0
881883
do K=2,nz+1
882-
h_rsum = h_rsum + h(k-1)*GV%H_to_Z
884+
h_rsum = h_rsum + h(k-1)
883885
if (CS%MixLenExponent==2.0) then
884886
MixLen_shape(K) = CS%transLay_scale + (1.0 - CS%transLay_scale) * &
885887
(max(0.0, (MLD_guess - h_rsum)*I_MLD) )**2 ! CS%MixLenExponent
@@ -1076,7 +1078,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
10761078
if (CS%wT_scheme==wT_from_cRoot_TKE) then
10771079
vstar = CS%vstar_scale_fac * vstar_unit_scale * (I_dtrho*TKE_here)**C1_3
10781080
elseif (CS%wT_scheme==wT_from_RH18) then
1079-
Surface_Scale = max(0.05, 1.0 - htot * GV%H_to_Z / MLD_guess)
1081+
Surface_Scale = max(0.05, 1.0 - htot / MLD_guess)
10801082
vstar = CS%vstar_scale_fac * Surface_Scale * (CS%vstar_surf_fac*u_star + &
10811083
vstar_unit_scale * (CS%wstar_ustar_coef*conv_PErel*I_dtrho)**C1_3)
10821084
endif
@@ -1125,7 +1127,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
11251127
if (CS%wT_scheme==wT_from_cRoot_TKE) then
11261128
vstar = CS%vstar_scale_fac * vstar_unit_scale * (I_dtrho*TKE_here)**C1_3
11271129
elseif (CS%wT_scheme==wT_from_RH18) then
1128-
Surface_Scale = max(0.05, 1. - htot * GV%H_to_Z / MLD_guess)
1130+
Surface_Scale = max(0.05, 1. - htot / MLD_guess)
11291131
vstar = CS%vstar_scale_fac * Surface_Scale * (CS%vstar_surf_fac*u_star + &
11301132
vstar_unit_scale * (CS%wstar_ustar_coef*conv_PErel*I_dtrho)**C1_3)
11311133
endif
@@ -1178,7 +1180,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
11781180
eCD%dTKE_MKE = eCD%dTKE_MKE + MKE_src * I_dtdiag
11791181
endif
11801182
if (sfc_connected) then
1181-
MLD_output = MLD_output + GV%H_to_Z * h(k)
1183+
MLD_output = MLD_output + h(k)
11821184
endif
11831185

11841186
Kddt_h(K) = Kd(K) * dt_h
@@ -1202,7 +1204,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
12021204
mech_TKE = TKE_reduc*(mech_TKE + MKE_src)
12031205
conv_PErel = TKE_reduc*conv_PErel
12041206
if (sfc_connected) then
1205-
MLD_output = MLD_output + GV%H_to_Z * h(k)
1207+
MLD_output = MLD_output + h(k)
12061208
endif
12071209

12081210
elseif (tot_TKE == 0.0) then
@@ -1303,7 +1305,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
13031305
endif
13041306

13051307
if (sfc_connected) MLD_output = MLD_output + &
1306-
(PE_chg / (PE_chg_g0)) * GV%H_to_Z * h(k)
1308+
(PE_chg / (PE_chg_g0)) * h(k)
13071309

13081310
tot_TKE = 0.0 ; mech_TKE = 0.0 ; conv_PErel = 0.0
13091311
sfc_disconnect = .true.
@@ -1422,7 +1424,7 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
14221424
eCD%LA = 0.0 ; eCD%LAmod = 0.0 ; eCD%mstar = mstar_total ; eCD%mstar_LT = 0.0
14231425
endif
14241426

1425-
MLD_io = MLD_output
1427+
MLD_io = GV%H_to_Z*MLD_output
14261428

14271429
end subroutine ePBL_column
14281430

@@ -2125,7 +2127,7 @@ subroutine energetic_PBL_init(Time, G, GV, US, param_file, diag, CS)
21252127
call get_param(param_file, mdl, "EPBL_MLD_TOLERANCE", CS%MLD_tol, &
21262128
"The tolerance for the iteratively determined mixed "//&
21272129
"layer depth. This is only used with USE_MLD_ITERATION.", &
2128-
units="meter", default=1.0, scale=US%m_to_Z, do_not_log=.not.CS%Use_MLD_iteration)
2130+
units="meter", default=1.0, scale=GV%m_to_H, do_not_log=.not.CS%Use_MLD_iteration)
21292131
call get_param(param_file, mdl, "EPBL_MLD_BISECTION", CS%MLD_bisection, &
21302132
"If true, use bisection with the iterative determination of the self-consistent "//&
21312133
"mixed layer depth. Otherwise use the false position after a maximum and minimum "//&

0 commit comments

Comments
 (0)