@@ -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
14271429end 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