@@ -2758,7 +2758,7 @@ subroutine kappa_eqdisc(shape_func, CS, GV, dz, absf, B_flux, u_star, MLD_guess)
2758
2758
! Lh < 0 --> surface stabilizing i.e. heating, and Lh > 0 --> surface destabilizing i.e. cooling
2759
2759
! This capping does not matter because these equations have asymptotes. Not sensitive beyond the caps.
2760
2760
Eh = min (Eh, 2.0 ) ! capping p1 to less than 2.0. It is always >0.0.
2761
- Lh = min ( max (Lh, - 8.0 ), 8.0 ) ! capping Lh between -8 and 8
2761
+ Lh = min (max (Lh, - 8.0 ), 8.0 ) ! capping Lh between -8 and 8
2762
2762
2763
2763
! Empirical model to predict sm:
2764
2764
! F is Equation 16 in Sane et al. 2025, and needs to be computed before sigma_m:
@@ -2771,8 +2771,7 @@ subroutine kappa_eqdisc(shape_func, CS, GV, dz, absf, B_flux, u_star, MLD_guess)
2771
2771
F_Eh = F * Eh
2772
2772
sm = F_Eh / (CS% ML_c(1 )* F_Eh + CS% ML_c(2 ))
2773
2773
2774
- sm = min (sm,0.7 ) ! makes sure sm is less than 0.7, true sm range is from (approx) 0.2 to 0.60
2775
- sm = max (sm,0.1 ) ! makes sure sm is more than 0.1
2774
+ sm = min (max (sm,0.1 ),0.7 ) ! makes sure 0.1<sm<0.7, true sm range is (approx) 0.2 to 0.60
2776
2775
2777
2776
sm_h = sm * hbl
2778
2777
sm_h_I = 1.0 / sm_h ! inverse of (sm x hbl)
@@ -2806,8 +2805,8 @@ subroutine kappa_eqdisc(shape_func, CS, GV, dz, absf, B_flux, u_star, MLD_guess)
2806
2805
elseif (hz_n <= hbl) then
2807
2806
2808
2807
z_minus_sm_h = (hz_n - sm_h)
2809
- z_minus_sm_h2 = ((hz_n - sm_h) * (hz_n - sm_h))
2810
- z_minus_sm_h3 = (hz_n - sm_h) * z_minus_sm_h2
2808
+ z_minus_sm_h2 = z_minus_sm_h * z_minus_sm_h
2809
+ z_minus_sm_h3 = z_minus_sm_h * z_minus_sm_h2
2811
2810
2812
2811
shape_func(n) = (coef_c3 * z_minus_sm_h3 + coef_c2 * z_minus_sm_h2) + 1.0
2813
2812
@@ -2904,8 +2903,8 @@ subroutine get_eqdisc_v0h(CS, B_flux, u_star, MLD_guess, v0_dummy)
2904
2903
real :: u_star_2 ! u_star squared, [Z2 T-2 ~> m2 s-2]
2905
2904
real :: u_star_3 ! u_star cubed, [Z3 T-3 ~> m3 s-3]
2906
2905
2907
- u_star_2 = u_star * u_star ! pre-multiplying u*
2908
- u_star_3 = u_star_2 * u_star ! obtained u_star ^ 3.0
2906
+ u_star_2 = u_star * u_star ! pre-multiplying to get ustar ^ 2
2907
+ u_star_3 = u_star_2 * u_star ! ustar ^ 3.0
2909
2908
2910
2909
if (B_flux <= CS% bflux_lower_cap) then
2911
2910
bflux_c = CS% bflux_lower_cap
@@ -4174,7 +4173,7 @@ subroutine energetic_PBL_init(Time, G, GV, US, param_file, diag, CS)
4174
4173
call get_param(param_file, mdl, " ML_diffusivity_coeffs" , CS% ML_c, &
4175
4174
" Coefficient used for ML diffusivity 1 to 24 " , units= " nondim" , &
4176
4175
defaults= (/ 1.7908 , 0.6904 , 0.0712 , 0.4380 , 2.6821 , 1.5845 , 0.1550 , 1.1120 , 0.8616 , 0.0984 , &
4177
- 45.0 , 2.8570 , 3.290 , 0.0764 , 8.2854 , 1.2026 , 12.7677 , 6.0277 , 15.7292 , 0.0785 / ))
4176
+ 45.0 , 2.8570 , 3.290 , 0.0785 , 8.2854 , 1.2026 , 12.7388 , 6.0277 , 15.7292 , 0.0785 / ))
4178
4177
4179
4178
call get_param(param_file, mdl, " Shape_Function_Epsilon" , CS% shape_function_epsilon, &
4180
4179
" Constant value of OSBL shape function below the boundary layer" , units= " nondim" , default= 0.01 )
0 commit comments