@@ -152,10 +152,20 @@ function buoyancy_gradients(
152152 error (" Unsupported moisture model" )
153153 end
154154
155+ t_sat = get_t_sat (thermo_params, bg_model)
155156 phase_part = TD. PhasePartition (thermo_params, ts_sat)
156- lh = TD. latent_heat_liq_ice (thermo_params, phase_part)
157+ lh =
158+ (
159+ get_ql_sat (thermo_params, bg_model) *
160+ TD. latent_heat_vapor (thermo_params, t_sat) +
161+ get_qi_sat (thermo_params, bg_model) *
162+ TD. latent_heat_sublim (thermo_params, t_sat)
163+ ) /
164+ (
165+ get_ql_sat (thermo_params, bg_model) +
166+ get_qi_sat (thermo_params, bg_model) + sqrt (eps (FT))
167+ )
157168 cp_m = TD. cp_m (thermo_params, ts_sat)
158- t_sat = get_t_sat (thermo_params, bg_model)
159169 qv_sat = get_qv_sat (thermo_params, bg_model)
160170 ∂b∂θli_sat = (
161171 ∂b∂θv *
257267Calculates the surface flux of TKE, a C3 vector used by
258268ClimaAtmos operator boundary conditions.
259269
260- The flux magnitude is modeled as
261- c_k * ρa_sfc * ustar^3`,
270+ The flux magnitude is modeled as
271+ c_k * ρa_sfc * ustar^3`,
262272directed along the surface upward normal.
263273
264274Details:
@@ -323,12 +333,12 @@ where:
323333- `scale_blending_method`: The method to use for blending physical scales.
324334
325335Point-wise calculation of the turbulent mixing length, limited by physical constraints (wall distance,
326- TKE balance, stability) and grid resolution. Based on
327- Lopez‐Gomez, I., Cohen, Y., He, J., Jaruga, A., & Schneider, T. (2020).
328- A generalized mixing length closure for eddy‐diffusivity mass‐flux schemes of turbulence and convection.
336+ TKE balance, stability) and grid resolution. Based on
337+ Lopez‐Gomez, I., Cohen, Y., He, J., Jaruga, A., & Schneider, T. (2020).
338+ A generalized mixing length closure for eddy‐diffusivity mass‐flux schemes of turbulence and convection.
329339Journal of Advances in Modeling Earth Systems, 12, e2020MS002161. https://doi.org/ 10.1029/2020MS002161
330340
331- Returns a `MixingLength{FT}` struct containing the final blended mixing length (`master`)
341+ Returns a `MixingLength{FT}` struct containing the final blended mixing length (`master`)
332342and its constituent physical scales.
333343"""
334344
@@ -370,8 +380,8 @@ function mixing_length_lopez_gomez_2020(
370380 # Ensure l_z is non-negative when ᶜz is numerically smaller than z_sfc.
371381 l_z = max (l_z, FT (0 ))
372382
373- # l_W: Wall-constrained length scale (near-surface limit, to match
374- # Monin-Obukhov Similarity Theory in the surface layer, with Businger-Dyer
383+ # l_W: Wall-constrained length scale (near-surface limit, to match
384+ # Monin-Obukhov Similarity Theory in the surface layer, with Businger-Dyer
375385 # type stability functions)
376386 tke_sfc_safe = max (sfc_tke, eps_FT)
377387 ustar_sq_safe = max (ustar * ustar, eps_FT) # ustar^2 may vanish in certain LES setups
0 commit comments