|
1 | 1 | # Horizontal EDMF diffusion |
2 | 2 |
|
3 | | -The EDMFX environment sub-grid scale (SGS) diffusive flux is, by default, vertical only: it parameterizes turbulent transport along the column with an eddy-diffusivity closure and applies the resulting tendency to the grid mean. The horizontal component adds the analogous horizontal down-gradient flux. It is enabled with the configuration option `edmfx_sgs_horizontal_diffusive_flux` (default `false`). |
| 3 | +The EDMFX sub-grid scale (SGS) diffusive closure is, by default, vertical only: it parameterizes turbulent transport along the column with an eddy-diffusivity closure and applies the resulting tendency to the grid mean (and, under `edmfx_vertical_diffusion`, to the prognostic updrafts). Two opt-in configuration options add the analogous horizontal down-gradient terms, both defaulting to `false`: |
4 | 4 |
|
5 | | -## Formulation |
| 5 | + - `edmfx_sgs_horizontal_diffusive_flux` adds the horizontal component of the grid-mean environment SGS diffusive flux; |
| 6 | + - `edmfx_horizontal_diffusion` adds horizontal diffusion of the prognostic EDMFX updraft variables. |
6 | 7 |
|
7 | | -The horizontal flux uses the same TKE-based eddy diffusivity as the vertical flux, |
| 8 | +Both terms are always explicit: they are applied in the explicit remainder tendency, independently of `diff_mode`, and never enter the implicit column solve. Each requires a horizontal discretization, so both return immediately on single columns. |
| 9 | + |
| 10 | +## Horizontal eddy diffusivity |
| 11 | + |
| 12 | +The horizontal eddy viscosity and diffusivity use the same TKE-based closure as the vertical flux, |
8 | 13 |
|
9 | 14 | ```math |
10 | | -K = c_m \, l \, \sqrt{e} \,/\, \mathrm{Pr}_t , |
| 15 | +K_u = c_m \, l \, \sqrt{e}, \qquad K_h = K_u \,/\, \mathrm{Pr}_t , |
11 | 16 | ``` |
12 | 17 |
|
13 | | -where ``l`` is the environment mixing length, ``e`` is the environment turbulent kinetic energy (TKE), ``c_m`` is the eddy-diffusivity coefficient, and ``\mathrm{Pr}_t`` the turbulent Prandtl number. The grid-mean tendencies are, on cell centers, |
| 18 | +where ``l`` is the horizontal mixing length (see [Mixing length](@ref)), ``e`` is the environment turbulent kinetic energy (TKE), ``c_m`` is the eddy-diffusivity coefficient, and ``\mathrm{Pr}_t`` the turbulent Prandtl number. `set_horizontal_diffusivities!` evaluates ``K_u`` and ``K_h`` at cell centers on each update of the explicit precomputed cache, storing them in `ᶜK_u_h` and `ᶜK_h_h`. Both horizontal tendencies and the diagnostics read these cached fields. |
| 19 | + |
| 20 | +Unlike the vertical face pipeline (`set_face_diffusivities!`), the horizontal diffusivities do not include the interfacial entrainment diffusivity ``K_e``: that term parameterizes vertical entrainment across an unresolved inversion face (``K_e = \gamma \, w_e \, \Delta z``) and has no horizontal analogue. Its exclusion here mirrors its exclusion from the updraft-internal vertical diffusion. |
| 21 | + |
| 22 | +## Grid-mean flux |
| 23 | + |
| 24 | +The grid-mean tendencies from `edmfx_sgs_horizontal_diffusive_flux` are, on cell centers, |
14 | 25 |
|
15 | 26 | ```math |
16 | 27 | \partial_t (\rho e_\text{tot}) \mathrel{+}= \nabla_h \cdot \left[ \rho \, K_h \left( \nabla_h s_\text{d} + \sum_{\mu} (h_\mu + \Phi) \, \nabla_h q_\mu \right) \right], |
17 | 28 | ``` |
18 | 29 |
|
19 | 30 | ```math |
20 | | -\partial_t (\rho \chi) \mathrel{+}= \nabla_h \cdot (\rho \, K_h \, \nabla_h \chi), |
| 31 | +\partial_t (\rho q_\text{tot}) \mathrel{+}= \nabla_h \cdot (\rho \, K_h \, \nabla_h q_\text{tot}), |
21 | 32 | \qquad |
22 | | -\partial_t (\rho e) \mathrel{+}= \nabla_h \cdot (\rho \, K_u \, \nabla_h e), |
| 33 | +\partial_t (\rho \chi) \mathrel{+}= \nabla_h \cdot (\rho \, \alpha_\chi \, K_h \, \nabla_h \chi), |
23 | 34 | ``` |
24 | 35 |
|
25 | | -where ``\nabla_h`` and ``\nabla_h\cdot`` are the horizontal gradient and weak divergence, ``s_\text{d}`` is the dry static energy, ``h_\mu`` and ``q_\mu`` are the specific enthalpy and specific humidity of the water species ``\mu \in \{\text{vap}, \text{liq}, \text{ice}\}``, ``\Phi`` is the geopotential, ``K_u`` is the eddy viscosity and ``K_h = K_u/\mathrm{Pr}_t``. The total enthalpy uses the dry-static-energy + water-enthalpy decomposition of the vertical flux, which avoids the spurious enthalpy flux that diffusing ``h_\text{tot}`` directly would carry with the dry-air mass. The tracer ``\chi`` ranges over the total specific humidity and the environment SGS tracers — the microphysics species (cloud, precipitation, and, for two-moment schemes, number concentrations) and any passive tracers — i.e. the same set the vertical flux diffuses. Sedimenting microphysics species are scaled by the tracer diffusion factor ``\alpha`` (`α_vert_diff_tracer`); other tracers use the unscaled ``K_h``, matching the vertical flux. The total-specific-humidity flux additionally enters the air-mass tendency ``\partial_t \rho``; condensate and precipitation fluxes do not. |
| 36 | +where ``\nabla_h`` and ``\nabla_h\cdot`` are the horizontal gradient and weak divergence, ``s_\text{d}`` is the dry static energy, ``h_\mu`` and ``q_\mu`` are the specific enthalpy and specific humidity of the water species ``\mu \in \{\text{vap}, \text{liq}, \text{ice}\}``, and ``\Phi`` is the geopotential. The total enthalpy uses the dry-static-energy + water-enthalpy decomposition of the vertical flux, which avoids the spurious enthalpy flux that diffusing ``h_\text{tot}`` directly would carry with the dry-air mass. The four constituents (dry static energy, vapor, liquid, ice) are assembled in separate broadcasts; a regression test asserts that the ``\rho e_\text{tot}`` tendency equals their sum. |
26 | 37 |
|
27 | | -The momentum tendency is the horizontal weak divergence of the subgrid-scale stress ``\tau = -2 K_u \mathcal{S}``, with ``\mathcal{S}`` the full three-dimensional strain rate of the grid-mean velocity, |
| 38 | +The tracer ``\chi`` ranges over the grid-mean SGS tracers — microphysics species (cloud, precipitation, and, for two-moment schemes, number concentrations) and any passive tracers. Sedimenting microphysics species carry the tracer diffusion factor ``\alpha_\chi = \alpha`` (`α_vert_diff_tracer`); all other tracers use the unscaled ``K_h`` (``\alpha_\chi = 1``), matching the vertical flux. The total-specific-humidity flux additionally enters the moist-air-mass tendency, |
28 | 39 |
|
29 | 40 | ```math |
30 | | -\partial_t u_h \mathrel{-}= \frac{1}{\rho} \nabla_h \cdot (\rho \, \tau), |
31 | | -\qquad |
32 | | -\partial_t u_3 \mathrel{-}= \frac{1}{\rho} \nabla_h \cdot (\rho \, \tau), |
| 41 | +\partial_t \rho \mathrel{+}= \nabla_h \cdot (\rho \, K_h \, \nabla_h q_\text{tot}), |
33 | 42 | ``` |
34 | 43 |
|
35 | | -evaluated on cell centers for the horizontal wind and on cell faces for the vertical wind, mirroring the Smagorinsky-Lilly stress split by divergence direction; the vertical stress divergence is handled by the vertical diffusion pathway. |
| 44 | +while the condensate and precipitation fluxes do not. |
36 | 45 |
|
37 | | -The corresponding shear production of TKE uses the strain rate built from horizontal gradients only, ``\mathcal{S}_h``, |
| 46 | +When prognostic TKE is active, the horizontal flux transports TKE and adds the horizontal shear production, |
38 | 47 |
|
39 | 48 | ```math |
40 | | -\partial_t (\rho e) \mathrel{+}= 2 \rho \, K_u \, \mathcal{S}_h : \mathcal{S}_h , |
| 49 | +\partial_t (\rho e) \mathrel{+}= \nabla_h \cdot (\rho \, K_u \, \nabla_h e) + 2 \rho \, K_u \, \mathcal{S}_h : \mathcal{S}_h , |
41 | 50 | ``` |
42 | 51 |
|
43 | | -which is positive definite; the production from vertical gradients and its stencil are unchanged. This mirrors the decoupled Smagorinsky-Lilly split, in which each directional norm is built from that direction's gradients. |
| 52 | +with ``\mathcal{S}_h`` the strain rate built from horizontal gradients only. The shear production is positive definite; the production from vertical gradients and its stencil are applied by the vertical TKE tendency. |
| 53 | + |
| 54 | +The momentum tendency is the horizontal weak divergence of the SGS stress ``\tau = -2 K_u \mathcal{S}``, with ``\mathcal{S}`` the full three-dimensional strain rate of the grid-mean velocity, |
44 | 55 |
|
45 | | -The horizontal flux mirrors the vertical EDMFX diffusive flux: the same variables, the same tracer set, and the same scaling, with horizontal rather than vertical operators. |
| 56 | +```math |
| 57 | +\partial_t u_h \mathrel{-}= \frac{1}{\rho} \nabla_h \cdot (\rho \, \tau), |
| 58 | +\qquad |
| 59 | +\partial_t u_3 \mathrel{-}= \frac{1}{\rho} \nabla_h \cdot (\rho \, \tau), |
| 60 | +``` |
46 | 61 |
|
47 | | -## Anisotropic length scale |
| 62 | +evaluated on cell centers for the horizontal wind and on cell faces for the vertical wind. The vertical divergence of the stress is handled by the vertical diffusion pathway. |
48 | 63 |
|
49 | | -The eddy diffusivity depends on direction only through the mixing length ``l``: the TKE ``e`` is isotropic. In the Lopez-Gomez et al. (2020) closure the mixing length is the smooth minimum of physical scales (wall distance, TKE production–dissipation balance, static stability), limited from above by a grid scale, |
| 64 | +## Updraft horizontal diffusion |
| 65 | + |
| 66 | +The option `edmfx_horizontal_diffusion` switches on horizontal diffusion of the prognostic updraft variables, mirroring the vertical updraft diffusion of `edmfx_vertical_diffusion` with the horizontal mixing length. For each updraft ``j``, |
50 | 67 |
|
51 | 68 | ```math |
52 | | -l = \min(l_\text{phys}, \, \Delta). |
| 69 | +\partial_t \chi^j \mathrel{+}= \frac{1}{\rho^j} \nabla_h \cdot (\rho^j \, \alpha_\chi \, K_h \, \nabla_h \chi^j), |
53 | 70 | ``` |
54 | 71 |
|
55 | | -Unlike the Smagorinsky-Lilly closure, whose length scale is purely geometric (``l = c_s \Delta``), the EDMF length is physically based; only its grid-scale limiter is geometric. The vertical and horizontal fluxes therefore share the same physical length but use different limiters — the cell thickness ``\Delta z`` for the vertical flux and the horizontal node spacing ``\Delta x`` for the horizontal flux: |
| 72 | +for the moist static energy, the total specific humidity, and the updraft SGS tracers (with ``\alpha_\chi = \alpha`` for sedimenting species and ``1`` otherwise). The updraft dry-air mass is unchanged by the water flux, so the area-weighted density ``\rho a^j`` receives the counterpart tendency ``\rho a^j / (1 - q_\text{tot}^j)`` times the ``q_\text{tot}^j`` tendency, mirroring the hyperdiffusion treatment. |
| 73 | + |
| 74 | +## Mixing length |
| 75 | + |
| 76 | +The eddy diffusivity depends on direction only through the mixing length ``l``: the TKE ``e`` is isotropic. The horizontal mixing length is the full physical mixing length ``l_\text{phys}`` of the Lopez-Gomez et al. (2020) closure — the smooth minimum of the wall, TKE-balance, and static-stability (from ``N^2_\text{eff}``) scales, unchanged from the vertical closure — limited from above by a grid scale. It differs from the vertical (master) mixing length only in that grid limiter: the horizontal length uses the spectral-element node scale ``\Delta x_h`` (`horizontal_filter_scale`), whereas the vertical pipeline uses the resolvability filter scale ``\Delta_f = \max(\Delta x_h, \Delta z)`` (`resolvability_filter_scale`), |
56 | 77 |
|
57 | 78 | ```math |
58 | | -l_v = \min(l_\text{phys}, \, \Delta z), |
| 79 | +l_h = \min(l_\text{phys}, \, \Delta x_h), |
59 | 80 | \qquad |
60 | | -l_h = \min(l_\text{phys}, \, \Delta x). |
| 81 | +l = \min(l_\text{phys}, \, \Delta_f). |
61 | 82 | ``` |
62 | 83 |
|
63 | | -This mirrors the Smagorinsky-Lilly horizontal/vertical split, in which the two length scales are ``c_s \Delta x`` and ``c_s \Delta z``. Two limits follow: |
64 | | - |
65 | | - - where ``l_\text{phys} < \min(\Delta x, \Delta z)`` (for example small near-surface |
66 | | - eddies), ``l_h = l_v = l_\text{phys}`` and the diffusivity is isotropic; |
67 | | - - where ``l_\text{phys} > \max(\Delta x, \Delta z)``, the ratio ``l_h / l_v = \Delta x / \Delta z`` recovers the Smagorinsky grid anisotropy. |
| 84 | +Wherever ``\Delta x_h \ge \Delta z`` — single columns and GCM resolutions — the two limiters coincide (``\Delta_f = \Delta x_h``), so ``l_h = l`` and the horizontal diffusivity equals the one built from the master mixing length. They differ only where ``\Delta z > \Delta x_h`` (gray-zone and LES aspect ratios): there ``\Delta_f = \Delta z`` while the horizontal length remains limited by ``\Delta x_h``, giving the shorter horizontal scale ``l_h \le l`` and the ratio ``l_h / l = \Delta x_h / \Delta z`` wherever ``l_\text{phys}`` exceeds both spacings. |
68 | 85 |
|
69 | 86 | ## When to enable it |
70 | 87 |
|
71 | | -Horizontal EDMF diffusion is intended for box configurations whose horizontal grid spacing is comparable to or smaller than the physical mixing length, so that the horizontal limiter ``\min(l_\text{phys}, \Delta x)`` binds. This is the high-resolution and gray-zone regime, where the horizontal grid is fine enough for an anisotropic SGS length scale to matter. |
| 88 | +Horizontal EDMF diffusion is intended for box configurations whose horizontal node scale ``\Delta x_h`` is comparable to or smaller than the physical mixing length, so that the horizontal limiter ``\min(l_\text{phys}, \Delta x_h)`` binds. This is the high-resolution and gray-zone regime, where an anisotropic SGS length scale matters. |
72 | 89 |
|
73 | | -At coarse horizontal resolution (for example global runs with ``\Delta x`` of tens of kilometers) the horizontal limiter rarely binds, the horizontal diffusivity reduces to the isotropic environment value, and the term is typically negligible next to resolved horizontal transport. The option is off by default for that reason. |
| 90 | +At coarse horizontal resolution (for example global runs with ``\Delta x_h`` of tens of kilometers) the horizontal limiter rarely binds, the horizontal diffusivity reduces to the isotropic environment value, and the term is typically negligible next to resolved horizontal transport. Both options are off by default for that reason. |
74 | 91 |
|
75 | | -The horizontal term is a grid-mean closure applied independently of the vertical flux and of the diffusion mode: it is always explicit, since the horizontal operators are not part of the column implicit solve, while the vertical flux remains implicit when `implicit_diffusion` is set. The Smagorinsky-Lilly and anisotropic-minimum-dissipation closures already supply horizontal SGS diffusion of the same fields, so combining either with this option is rejected at model construction. |
| 92 | +The Smagorinsky-Lilly and anisotropic-minimum-dissipation closures already supply horizontal SGS diffusion of the same fields, so combining `edmfx_sgs_horizontal_diffusive_flux` with either is rejected at model construction. |
76 | 93 |
|
77 | | -Because the term is explicit, it adds a horizontal diffusive stability limit on the timestep, ``\Delta t \lesssim \Delta x^2 / (2 K_h)``. At the fine horizontal resolutions where this closure is intended, the timestep is in practice already set by the explicit horizontal acoustic limit ``\Delta t \lesssim \Delta x / c_s``, which is the more restrictive of the two. |
| 94 | +Because the term is explicit, it adds a horizontal diffusive stability limit on the timestep, ``\Delta t \lesssim \Delta x_h^2 / (2 K_h)``. At the fine horizontal resolutions where this closure is intended, the timestep is in practice already set by the explicit horizontal acoustic limit ``\Delta t \lesssim \Delta x_h / c_s``, which is the more restrictive of the two. |
78 | 95 |
|
79 | 96 | ## Configuration |
80 | 97 |
|
81 | 98 | ```yaml |
82 | 99 | edmfx_sgs_horizontal_diffusive_flux: true # default: false |
| 100 | +edmfx_horizontal_diffusion: true # default: false |
83 | 101 | ``` |
84 | 102 |
|
85 | 103 | ## Diagnostics |
86 | 104 |
|
87 | 105 | Three diagnostic variables expose the horizontal closure fields: |
88 | 106 |
|
89 | | - - `lmixh`: the mixing length with the grid-scale limit set by the horizontal node |
90 | | - spacing, ``l_h`` [m]; |
91 | | - - `edth`: the horizontal eddy diffusivity for scalars, ``K_h`` [m² s⁻¹]; |
92 | | - - `evuh`: the horizontal eddy viscosity, ``K_u`` [m² s⁻¹]. |
| 107 | + - `lmixh`: the horizontal mixing length ``l_h`` [m], recomputed lazily with the grid-scale limit set by the horizontal node spacing; |
| 108 | + - `edth`: the horizontal eddy diffusivity for scalars ``K_h`` [m² s⁻¹], read from the cached `ᶜK_h_h`; |
| 109 | + - `evuh`: the horizontal eddy viscosity ``K_u`` [m² s⁻¹], read from the cached `ᶜK_u_h`. |
93 | 110 |
|
94 | 111 | The vertical counterparts are `lmix`, `edt`, and `evu`. |
0 commit comments