CloudToppedMixedLayerModel

ConceptualClimateModels.CloudToppedMixedLayerModelModule
CloudToppedMixedLayerModel

Submodule providing processes about cloud topped mixed layer models (MLMs). This combines existing equations on MLM by (Stevens, 2006) and (Bretherton and Wyant, 1997), with surface energy balance and dynamic cloud equations. It is developed as part of the research article (Datseris, 2025). If you use this submodule, please cite the paper.

The organization is as follows:

  • All important variables and parameters (participate in many processes) are defined in the module file and as module-level scoped variables (global variables). Click the "source" of this docstring to access the module file.
  • All processes (physical equations) are defined in their respective files such as free_troposhere.jl, etc. Docstrings of important processes are expanded in the docs here. You will notice that all functions that return processes (equations) utilize these global variables and global parameters. Many of these functions will also define local variables and parameters. All noteworthy processes have docstrings that are expanded in the submodule online documentation. However, the majority of docstrings do not actually list the equations themselves. Simply click the "source code" button on the bottom right of each docstring to go to the source code. Because this package is written in Julia, and because it uses symbolic expressions throughout, reading the source code is truly as straight forward as reading Latex-rendered equations.
  • The default.jl file defines default processes for many global variables. These are also expanded in the docs.

Throughout the submodule time is in units of days, specific humidity is in units of g/kg, liquid water static energy is in units of K (i.e., normalized by cₚ), height in meters, temperature in K, and all energy quantities are in W/m².

To learn how to use this submodule visit first the general tutorial of ConceptualClimateModels.jl and then the dedicated example on a cloudy mixed layer model. The module purposefully does not export any names, so the recommended way to use it is by an alias: import ConceptualClimateModels.CloudToppedMixedLayerModel as CTMLM.

source

Mixed layer

ConceptualClimateModels.CloudToppedMixedLayerModel.bbl_stevens2006_steadystateFunction
bbl_stevens2006_steadystate(fixed; z_b, q_b, s_b, RCT)

Return the equations 35-38 in (Stevens, 2006) describing the analytically solved steady state of the MLM. These equations could be coupled to other parts of module but we have a problem of circular dependency for the steady state of $z_b$. If we attempt to couple them with the dynamic equations for $C$, then the following:

z_b ~ h⃰ * (e_e*σ_38)/(1 + σ_38 - e_e),
σ_38 ~ V*Δs*cₚ/(ΔF_s/ρ₀),

yields a circular dependency: z_b depends on σ_38 which depends on ΔF_s which depends on T_t which depends on z_b. To resolve this a fixed option is given, which can be any of: ΔF_s, z_b, w_s, T_t. This quantity is set fixed and becomes a parameter so that the equation for z_b is closed.

source
ConceptualClimateModels.CloudToppedMixedLayerModel.pressureFunction
pressure(z, T)

Use hydrostatic balance and ideal gas law to get pressure at height z given temperature at height z. The equation is often called the "Hypsometric equation" with the factor (RdT/g) called the scale height. Note that normally using Rd requires usage of Tv (virtual temperature), defined as Tv = T(1 + 0.608*q) with q the specific humidity of water vapor. In the codebase we practically always approximate Tv by T.

source

Clouds and decoupling

ConceptualClimateModels.CloudToppedMixedLayerModel.cloud_emissivityFunction
cloud_emissivity(version = 1.0; fraction = true)

Provide an equation for the effective emissivity ε_C of the cloud layer. Options for version:

  • :clt: inspired by (Randall and Suarez, 1984), emissivity scales with the thickness of the cloud layer.
  • :lwp: Expression given by (Stephens, 1978) where emissivity is an exponential of LWP.
  • <: Number: emissivity is just the provided number or symbolic expression.

If fraction = true the emissivity is further multiplied by the cloud fraction.

source
ConceptualClimateModels.CloudToppedMixedLayerModel.cloud_albedoFunction
cloud_albedo(version = 0.38; fraction = true)

Provide a process for α_C, the cloud albedo. If fraction == true, the expression is further multiplied by the cloud fraction C.

When version == :lwp we use an approach inspired by (Datseris and Stevens, 2021), using the expression from (Lacis and Hansen, 1974)

\[\alpha_C = \alpha_C^{max} \frac{\tau_C}{\tau_C + 1/(\sqrt{3}(1-g_C))}\]

where $\tau_C$ is the cloud optical depth (not the cloud fraction relaxation timescale) and $g_C$ the asymmetry factor for the cloud particle phase function. The optical depth is estimated as a function of the Liquid Water Path, fitted from Fig. 1 of (Stephens, 1978) as

\[\tau_C = \frac{x^1.7}{10 + x}\]

with $x$ the LWP in g/m². The expression fits very accurately for LWP up to 10³.

source
ConceptualClimateModels.CloudToppedMixedLayerModel.cloud_base_heightFunction
cloud_base_height(version = :exact, z_cb = z_lcl)

Provide an equation for the cloud base height captured by variable z_cb.

  • :exact: exact estimation by figuring out when q_liquid first becomes positive. Computationally costly as it requires interpolations.
  • :Bolton1980: Well known approximate expression by Bolton, 1980.

Because so far all versions calculate the lifting condensation level, z_cb defaults to z_lcl. (and the default process for z_cb is for it to be z_lcl).

source

Radiation

Free troposphere

ConceptualClimateModels.CloudToppedMixedLayerModel.mlm_s₊Function
mlm_s₊(
    version = :difference;
    cloud_effect = false,
    CO2_effect = false,
)

Provide equation for $s_+$. To do this, a boundary condition must be provided that is a fixed parameter. version argument decides this:

  • :difference: the temperature difference across inversion is a fixed parameter.
  • :temperature: the temperature after the inversion is a fixed parameter.
  • :static_energy: the moist static energy after the inversion is a fixed parameter.

Besides these, we can also specify whether CO2 increase also increases temperature difference, and whether decreasing $C$ decreases temperature difference due to cloud thinning as in (Singer and Schneider, apr 2023).

source

Default processes

using ConceptualClimateModels
import ConceptualClimateModels.CloudToppedMixedLayerModel as CTMLM
default_processes_eqs(CTMLM)

\[ \begin{align} S\left( t \right) &= \mathtt{S\_0} \\ \mathtt{\rho_0}\left( t \right) &= \frac{1.0178 \cdot 10^{5}}{287 \mathtt{SST}\left( t \right)} \\ \mathtt{q\_x}\left( t \right) &= 0 \\ \mathtt{L_0}\left( t \right) &= 5.6704 \cdot 10^{-8} \left( \mathtt{SST}\left( t \right) \right)^{4} \\ \mathtt{L\_b}\left( t \right) &= 5.6704 \cdot 10^{-8} \left( \mathtt{T\_b}\left( t \right) \right)^{4} \mathtt{\varepsilon\_b}\left( t \right) \\ \mathtt{T\_t}\left( t \right) &= temperature\_exact\left( \mathtt{z\_b}\left( t \right), \mathtt{s\_b}\left( t \right), \mathtt{q\_b}\left( t \right) \right) \\ \mathtt{\Delta.s}\left( t \right) &= - \mathtt{s\_b}\left( t \right) + \mathtt{s.}\left( t \right) \\ \mathtt{s\_x}\left( t \right) &= 0 \\ \mathtt{s_0}\left( t \right) &= \mathtt{SST}\left( t \right) \\ \mathtt{\Delta_{0}q}\left( t \right) &= \mathtt{q\_b}\left( t \right) - \mathtt{q_0}\left( t \right) \\ \mathtt{L\_c}\left( t \right) &= 5.6704 \cdot 10^{-8} \left( \mathtt{T\_C}\left( t \right) \right)^{4} \mathtt{\varepsilon\_C}\left( t \right) \\ \mathtt{{\Delta}F\_q}\left( t \right) &= 0 \\ \alpha\left( t \right) &= 1 - \left( 1 - \mathtt{\alpha\_C}\left( t \right) \right) \left( 1 - \mathtt{\alpha\_a} \right) \left( 1 - \mathtt{\alpha\_s} \right) \\ \mathtt{CLT}\left( t \right) &= max\left( \mathtt{z\_ct}\left( t \right) - \mathtt{z\_cb}\left( t \right), 0 \right) \\ \zeta\left( t \right) &= 0 \\ \mathtt{RH\_b}\left( t \right) &= \frac{\mathtt{q\_b}\left( t \right)}{\mathtt{q_0}\left( t \right)} \\ V\left( t \right) &= U \mathtt{d\_c} \\ \mathtt{LHF}\left( t \right) &= - 2530 \mathtt{\Delta_{0}q}\left( t \right) V\left( t \right) \mathtt{\rho_0}\left( t \right) \\ \mathtt{w\_v}\left( t \right) &= 0 \\ \mathtt{\varepsilon\_FTR}\left( t \right) &= clamp\left( 0.62 + 1.642 \sqrt{0.0060026 \mathtt{RH.} e^{\frac{17.625 \left( -273.15 + \mathtt{T\_FTR}\left( t \right) \right)}{-30.11 + \mathtt{T\_FTR}\left( t \right)}}}, 0, 1 \right) \\ \mathtt{z\_ct}\left( t \right) &= \mathtt{z\_b}\left( t \right) \\ \mathtt{w\_m}\left( t \right) &= 0 \\ \mathtt{RCT}\left( t \right) &= min\left( \frac{\mathtt{CLT}\left( t \right)}{\mathtt{z\_b}\left( t \right)}, 1 \right) \\ \mathtt{CTRC}\left( t \right) &= \mathtt{CTRClw}\left( t \right) - \mathtt{CRCsw}\left( t \right) \\ \mathtt{\lambda\_s}\left( t \right) &= 0 \\ \mathtt{T\_b}\left( t \right) &= \left( 1 - \mathtt{h\_b} \right) \mathtt{s\_b}\left( t \right) + \mathtt{h\_b} \mathtt{T\_lcl}\left( t \right) \\ \mathtt{\Delta.q}\left( t \right) &= - \mathtt{q\_b}\left( t \right) + \mathtt{q.}\left( t \right) \\ \mathtt{CRC}\left( t \right) &= \mathtt{CRClw}\left( t \right) - \mathtt{CRCsw}\left( t \right) \\ \mathtt{ASW}\left( t \right) &= - \mathtt{CRCsw}\left( t \right) + S\left( t \right) \left( 1 - \alpha\left( t \right) \right) \\ \mathtt{\varepsilon\_b}\left( t \right) &= clamp\left( 0.62 + 1.642 \sqrt{0.0060026 e^{\frac{17.625 \left( -273.15 + \mathtt{T\_b}\left( t \right) \right)}{-30.11 + \mathtt{T\_b}\left( t \right)}} \mathtt{RH\_b}\left( t \right)}, 0, 1 \right) \\ \mathtt{q_0}\left( t \right) &= \frac{3.8025 \cdot 10^{5} e^{ - 5488.1 \left( -0.0036609 + \frac{1}{\mathtt{SST}\left( t \right)} \right)}}{1.0178 \cdot 10^{5} - 610.78 e^{ - 5488.1 \left( -0.0036609 + \frac{1}{\mathtt{SST}\left( t \right)} \right)}} \\ \mathtt{Lnet}\left( t \right) &= \mathtt{L_0}\left( t \right) - \mathtt{Ld}\left( t \right) \\ \mathtt{LWP}\left( t \right) &= liquid\_water\_path\_linear\left( \mathtt{T\_t}\left( t \right), \mathtt{z\_cb}\left( t \right), \mathtt{z\_ct}\left( t \right), \mathtt{q\_b}\left( t \right) \right) \\ \mathtt{SHF}\left( t \right) &= - 1004 V\left( t \right) \mathtt{\rho_0}\left( t \right) \mathtt{\Delta_{0}s}\left( t \right) \\ \mathtt{T\_C}\left( t \right) &= \frac{1}{2} \left( \mathtt{T\_t}\left( t \right) + \mathtt{T\_lcl}\left( t \right) \right) \\ \mathtt{z\_cb}\left( t \right) &= \mathtt{z\_lcl}\left( t \right) \\ \mathtt{SST\_X}\left( t \right) &= \mathtt{SST\_X\_0} \\ \mathtt{\Delta_{0}s}\left( t \right) &= \mathtt{s\_b}\left( t \right) - \mathtt{s_0}\left( t \right) \\ \mathtt{T\_lcl}\left( t \right) &= \mathtt{s\_b}\left( t \right) - 0.009761 \mathtt{CLT}\left( t \right) \\ \mathtt{L\_FTR}\left( t \right) &= 5.6704 \cdot 10^{-8} \left( \mathtt{T\_FTR}\left( t \right) \right)^{4} \mathtt{\varepsilon\_FTR}\left( t \right) \\ \mathtt{\lambda\_q}\left( t \right) &= 0 \end{align} \]