Subgrid-scale Model
One of the main challenges in LES modeling is the turbulence closure. The filtering process yields four SGS covariance terms (see the first five equations Sect. governing equations) that cannot be explicitly calculated. In PALM, two different subgrid-scale models are available to parameterize the SGS terms:
Selecting one of the available SGS models is done via the namelist parameter turbulence_closure.
Deardorff subgrid-scale model
In PALM, the default SGS model uses a 1.5-order closure according to Deardorff (1980). PALM applies the modified version of Moeng and Wyngaard (1988) and Saiki et al. (2000). The closure is based on the assumption that the energy transport by SGS eddies is proportional to the local gradients of the mean quantities and reads

where Km and Kh are the local SGS eddy diffusivities of momentum and heat, respectively. They are related to the SGS-TKE as follows

Here, cm = 0.1 is a model constant and

with Δx, Δy, Δz being the grid spacings in x, y and z direction, respectively. The SGS mixing length l depends on height z (distance from the wall when topography is used), grid spacing, and stratification and is calculated as

Moreover, the closure includes a prognostic equation for the SGS-TKE:
![\begin{align*}
& \frac{\partial{e}}{\partial t} = - u_j\frac{\partial
e}{\partial x_j} - \left(\overline{u_i^{\prime\prime}
u_j^{\prime\prime}}\right)\frac{\partial u_i} {\partial x_j} +
\frac{g}{\theta_{\mathrm{v},0}}\overline{u_3^{\prime\prime}
{\theta_{\mathrm{v}}}^{\prime\prime}}-\frac{\partial}{\partial x_j} \left[\overline{u_j^{\prime\prime}
\left(e + \frac{p^{\prime\prime}}{\rho_0}\right)}\right] -
\epsilon.
\end{align*}](/trac/tracmath/3700341bdb7d7a2a425888ef9d7a8b3cd91a7077.png)
The pressure term in the equation above is parametrized as
![\begin{align*}
&\left[\overline{u_j^{\prime\prime} \left(e +
\frac{p^{\prime\prime}}{\rho_0}\right)}\right] = -2
K_\mathrm{m} \frac{\partial e}{\partial x_j}
\end{align*}](/trac/tracmath/272032ac935668b75986ca0e144c065bb543fad1.png)
and ε is the SGS dissipation rate within a grid volume, given by

Since θv depends on θ, qv, and ql (see last equation Sect. governing equations), the vertical SGS buoyancy flux depends on the respective SGS fluxes (Stull, 1988, Chap. 4.4.5):

with

and the vertical SGS flux of liquid water, calculated as

Note that this parametrization of the SGS buoyancy flux differs from that used with bulk cloud microphysics (see Sect. turbulence closure in cloud microphysics).
Modified Deardorff subgrid-scale model
A modificaiton of the Deardorff scheme described above is available that provides an improved mixing length calculation for locally stable stratification, particularly if used with fine grid spacings. Details about the deficiencies of the Deardorff scheme and the following modified version are given by Dai et al. (2020). In the following, we only describe the two modifications that are applied to the Deardorff scheme described above.
First, the mixing length is calculated as

Seocnd, the eddy diffusivities are defined as
TracMath macro processor has detected an error. Please fix the problem before continuing.
The command:
'/usr/bin/pdflatex -interaction=nonstopmode 197a859bcba09c294e2473ffcc1fc24299df8ae8.tex'
failed with the following output:
"This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)\n restricted \\write18 enabled.\nentering extended mode\n(./197a859bcba09c294e2473ffcc1fc24299df8ae8.tex\nLaTeX2e <2011/06/27>\nBabel <3.9h> and hyphenation patterns for 78 languages loaded.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/size10.clo))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/utf8.def\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cmap/cmap.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cm-super/type1ec.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1cmr.fd))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap\n>>) (/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty\nFor additional information on amsmath, use the `?' option.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/tools/bm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/preview.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/prtightpage.def)\n)\nNo file 197a859bcba09c294e2473ffcc1fc24299df8ae8.aux.\nPreview: Fontsize 10pt\nPreview: PDFoutput 1\n<<ot1.cmap>><<oml.cmap>><<oms.cmap>><<omx.cmap>>\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)\n! You can't use `macro parameter character #' in horizontal mode.\nl.22 == [=#\n dynamic_sgs Dynamic subgrid-scale model] ==\n! Missing $ inserted.\n<inserted text> \n $\nl.22 == [=#dynamic_\n sgs Dynamic subgrid-scale model] ==\n! Missing $ inserted.\n<inserted text> \n $\nl.23 \n \n! You can't use `macro parameter character #' in horizontal mode.\nl.26 #\n !Latex\n\n! Package inputenc Error: Unicode char \\u8:\xce\x94 not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.31 where ''\xce\x94\n '',,max,, being the maximum of ''\xce\x94x'', ''\xce\x94y'', ''\xce\x94z''.\n\n! Package inputenc Error: Unicode char \\u8:\xce\x94 not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.31 where ''\xce\x94'',,max,, being the maximum of ''\xce\x94\n x'', ''\xce\x94y'', ''\xce\x94z''.\n\n! Package inputenc Error: Unicode char \\u8:\xce\x94 not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.31 ...,,max,, being the maximum of ''\xce\x94x'', ''\xce\x94\n y'', ''\xce\x94z''.\n\n! Package inputenc Error: Unicode char \\u8:\xce\x94 not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.31 ...eing the maximum of ''\xce\x94x'', ''\xce\x94y'', ''\xce\x94\n z''.\n! You can't use `macro parameter character #' in horizontal mode.\nl.32 ...on of ''c'',,*,, is based on an idea of [#\n germano Germano et al. (19...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.34 #\n !Latex\n! You can't use `macro parameter character #' in horizontal mode.\nl.41 #\n !Latex\n! You can't use `macro parameter character #' in horizontal mode.\nl.48 #\n !Latex\n! You can't use `macro parameter character #' in horizontal mode.\nl.55 #\n !Latex\n! You can't use `macro parameter character #' in horizontal mode.\nl.62 #\n !Latex\n\n! Package inputenc Error: Unicode char \\u8:\xce\xbd not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.67 ...oric strain tensor, repsectively, and ''\xce\xbd\n ,,t,,'' the SGS viscosity....\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.67 ... based on proven turbulence properties ([#\n heinz2008 Heinz, 2008]; [#...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.67 ...e properties ([#heinz2008 Heinz, 2008]; [#\n heinz2012 Heinz and Gopala...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.69 #\n !Latex\n! You can't use `macro parameter character #' in horizontal mode.\nl.74 as was derived by [#\n mokhtarpoor2017 Mokhtarpoor and Heinz (2017)]. This...\n\n\n! Package inputenc Error: Unicode char \\u8:\xce\xbd not set up for use with LaTeX.\n\nSee the inputenc package documentation for explanation.\nType H <return> for immediate help.\n ... \n \nl.74 ...ce of backscatter (negative values of ''\xce\xbd\n ,,t,,'').\n! You can't use `macro parameter character #' in horizontal mode.\nl.81 * [=#\n deardorff]'''Deardorff JW.''' 1980. Stratocumulus-capped mixed lay...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.83 * [=#\n germano]'''Germano M., Piomelli U., Moin P., Cabot WH.''' 1991. A ...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.85 * [=#\n heinz2008]'''Heinz S.''' 2008. Realizability of dynamic subgrid-sc...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.87 * [=#\n heinz2012]'''Heinz S., Gopalan H.''' 2012. Realizable versus non-r...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.89 * [=#\n moeng]'''Moeng CH, Wyngaard JC.''' 1988. Spectral analysis of larg...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.91 * [=#\n mokhtarpoor2017]'''Mokhtarpoor R., Heinz S.''' 2017. Dynamic large...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.93 * [=#\n saiki]'''Saiki EM, Moeng CH, Sullivan PP.''' 2000. Large-eddy simu...\n\n! You can't use `macro parameter character #' in horizontal mode.\nl.95 * [=#\n stull]'''Stull RB.''' 1988. An Introduction to Boundary Layer Mete...\n\nPreview: Tightpage -32891 -32891 32891 32891\n[1{/localdata/software/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.ma\np}] (./197a859bcba09c294e2473ffcc1fc24299df8ae8.aux) )\n(see the transcript file for additional information){/localdata/software/texliv\ne/2013/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc}</localdata/software\n/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></localdata/\nsoftware/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></lo\ncaldata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.p\nfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/\ncmr10.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfo\nnts/cm/cmr5.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public\n/amsfonts/cm/cmr7.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/\npublic/amsfonts/cm/cmsy10.pfb></localdata/software/texlive/2013/texmf-dist/font\ns/type1/public/amsfonts/cm/cmsy7.pfb></localdata/software/texlive/2013/texmf-di\nst/fonts/type1/public/cm-super/sfrm1000.pfb>\nOutput written on 197a859bcba09c294e2473ffcc1fc24299df8ae8.pdf (1 page, 107007 \nbytes).\nTranscript written on 197a859bcba09c294e2473ffcc1fc24299df8ae8.log.\n"