@@ -309,7 +309,8 @@ function mixing_length_lopez_gomez_2020(
309309 # MOST stability function coefficients
310310 most_a_m = sf_params. ufp. a_m # Businger a_m
311311 most_b_m = sf_params. ufp. b_m # Businger b_m
312- most_g_m = CAP. coefficient_b_m_gryanik (params) # Gryanik b_m
312+ gryanik_a_m = CAP. coefficient_a_m_gryanik (params) # Gryanik a_m
313+ gryanik_b_m = CAP. coefficient_b_m_gryanik (params) # Gryanik b_m
313314
314315 # l_z: Geometric distance from the surface
315316 l_z = ᶜz - z_sfc
@@ -359,16 +360,14 @@ function mixing_length_lopez_gomez_2020(
359360 zeta = l_z / obukhov_len_safe_stable # zeta >= 0
360361
361362 # Stable/neutral-regime correction after Gryanik (2020):
362- # φ_m = 1 + a_m ζ / (1 + g_m ζ)^(2/3),
363+ # φ_m = 1 + a_m ζ / (1 + b_m ζ)^(2/3),
363364 # a nonlinear refinement to the Businger formulation.
364- phi_m_denom_term = (1 + most_g_m * zeta )
365+ # Optimization: (1+b_m*ζ)^(2/3) -> cbrt((1+b_m*ζ)^2 )
365366 # Guard against a negative base in the fractional power
366- # (theoretically impossible for ζ ≥ 0 and g_m > 0, retained for robustness).
367- phi_m_denom_cubed_sqrt = cbrt (phi_m_denom_term)
368- phi_m_denom =
369- max (phi_m_denom_cubed_sqrt * phi_m_denom_cubed_sqrt, eps_FT) # (val)^(2/3)
367+ # (theoretically impossible for ζ ≥ 0 and b_m > 0, retained for robustness).
368+ phi_m_denom = max (cbrt ((1 + gryanik_b_m * zeta)^ 2 ), eps_FT)
370369
371- phi_m = 1 + (most_a_m * zeta) / phi_m_denom
370+ phi_m = 1 + (gryanik_a_m * zeta) / phi_m_denom
372371
373372 # Stable-regime correction factor: 1 / φ_m.
374373 # phi_m should be >= 1 for stable/neutral
0 commit comments