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, CLT)

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/ρ₀),

yields a circular dependency: z_b depends on σ_38 which depends on ΔF which depends on T_t which depends on z_b. To resolve this a fixed option is given, which can be any of: ΔF, 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 of the cloud layer. Options for version:

  • :clt: inspired by (Randall and Suarez, 1984), emissivity scales with the depth of the cloud layer.
  • :liquid_water_path: Exponential of LWP.
  • <: Number: emissiviy is just the provided number or symbolic expression.

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

source
ConceptualClimateModels.CloudToppedMixedLayerModel.cloud_layer_thicknessFunction
cloud_layer_thickness(version = :exact)

Provide an equation for the relative/normalized cloud layer thickness CLT. The options for version are:

  • :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.
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 starting temperature difference across inversion is a fixed parameter.
  • :temperature: the starting temperature after the inversion is a fixed parameter.
  • :static_energy: the starting 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) \\ \alpha\left( t \right) &= 1 - \left( 1 - C\left( t \right) \mathtt{\alpha\_C} \right) \left( 1 - \mathtt{\alpha\_a} \right) \left( 1 - \mathtt{\alpha\_s} \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{c\_d} \\ \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{T\_c}\left( t \right) &= \frac{1}{2} \left( \mathtt{T\_t}\left( t \right) + \mathtt{T\_lcl}\left( t \right) \right) \\ \mathtt{w\_m}\left( t \right) &= 0 \\ \mathtt{CTRC}\left( t \right) &= \mathtt{CTRClw}\left( t \right) - \mathtt{CRCsw}\left( t \right) \\ \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\left( \mathtt{T\_t}\left( t \right), \mathtt{CLT}\left( t \right), \mathtt{z\_b}\left( t \right), \mathtt{s\_b}\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{\mathscr{d}\_q}\left( t \right) &= 0 \\ \mathtt{\mathscr{d}\_s}\left( t \right) &= 0 \\ \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{z\_b}\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) \end{align} \]