-
Notifications
You must be signed in to change notification settings - Fork 4
Add more cross-links in documentation #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dbae109
46726fc
9d1e58e
9d142b3
79e2d0e
52971cc
a63cc66
2704091
069c6e5
7095459
ef3d56b
ddab964
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,19 +7,19 @@ Mixed-phase saturation adjustment is described by [Pressel2015](@citet). | |
| ## Moist static energy and total moisture mass fraction | ||
|
|
||
| The saturation adjustment solver (specific to our anelastic formulation) takes four inputs: | ||
| * moist static energy ``e`` | ||
| * total moisture mass fraction ``qᵗ`` | ||
| * height ``z`` | ||
| * reference pressure ``pᵣ`` | ||
| * moist static energy ``e``, | ||
| * total moisture mass fraction ``qᵗ``, | ||
| * height ``z``, and | ||
| * reference pressure ``pᵣ``. | ||
|
|
||
| Note that moist static energy density ``ρᵣ e`` and moisture density ``ρᵣ qᵗ`` | ||
| are prognostic variables for `Breeze.AtmosphereModel` when using `AnelasticFormulation`, | ||
| are prognostic variables for [`AtmosphereModel`](@ref) when using [`AnelasticFormulation`](@ref), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. out of curiosity, is there other formulations available? no, right?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not yet. we plan to implement a fully compressible formulation though.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the fully compressible case, |
||
| where ``ρᵣ`` is the reference density. | ||
| With warm-phase microphysics, the moist static energy ``e`` is related to temperature ``T``, | ||
| height ``z``, and liquid mass fraction ``qˡ`` by | ||
|
|
||
| ```math | ||
| e \equiv cᵖᵐ \, T + g z - ℒˡᵣ qˡ , | ||
| e ≡ cᵖᵐ \, T + g z - ℒˡᵣ qˡ , | ||
| ``` | ||
|
|
||
| where ``cᵖᵐ`` is the mixture heat capacity, ``g`` is gravitational acceleration, | ||
|
|
@@ -56,7 +56,7 @@ where ``qᵈ = 1 - qᵗ`` is the dry air mass fraction, ``qᵛ`` is the specific | |
| ``Rᵈ`` is the dry air gas constant, and ``Rᵛ`` is the vapor gas constant. | ||
| The density ``ρ`` is expressed in terms of ``pᵣ`` under the anelastic approximation. | ||
|
|
||
| In saturated conditions, we have ``qᵛ ≡ qᵛ⁺`` by definition, which leads to the expression | ||
| In saturated conditions, we have ``qᵛ ≡ qᵛ⁺`` by definition, which leads to the expression | ||
|
|
||
| ```math | ||
| qᵛ⁺ = \frac{ρᵛ⁺}{ρ} = \frac{Rᵐ}{Rᵛ} \frac{pᵛ⁺}{pᵣ} = \frac{Rᵈ}{Rᵛ} \left ( 1 - qᵗ \right ) \frac{pᵛ⁺}{pᵣ} + qᵛ⁺ \frac{pᵛ⁺}{pᵣ} . | ||
|
|
@@ -69,14 +69,14 @@ _valid only in saturated conditions and under the assumptions of saturation adju | |
| qᵛ⁺ = \frac{Rᵈ}{Rᵛ} \left ( 1 - qᵗ \right ) \frac{pᵛ⁺}{pᵣ - pᵛ⁺} . | ||
| ``` | ||
|
|
||
| This expression can also be found in [Pressel2015](@citet), equation 37. | ||
| This expression can also be found in paper by [Pressel2015](@citet), equation (37). | ||
|
|
||
| ## The saturation adjustment algorithm | ||
|
|
||
| We compute the saturation adjustment temperature by solving the nonlinear algebraic equation | ||
|
|
||
| ```math | ||
| 0 = r(T) \equiv T - \frac{1}{cᵖᵐ} \left [ e - g z + ℒˡᵣ \max(0, qᵗ - qᵛ⁺) \right ] \, | ||
| 0 = r(T) ≡ T - \frac{1}{cᵖᵐ} \left [ e - g z + ℒˡᵣ \max(0, qᵗ - qᵛ⁺) \right ] \, | ||
| ``` | ||
|
|
||
| where ``r`` is the "residual", using a secant method. | ||
|
|
@@ -117,7 +117,7 @@ In equilibrium (and thus under the assumptions of saturation adjustment), the sp | |
| ``qᵛ = qᵛ⁺``, while the liquid mass fraction is | ||
|
|
||
| ```@example microphysics | ||
| qˡ = qᵗ - qᵛ⁺ | ||
| qˡ = qᵗ - qᵛ⁺ | ||
| ``` | ||
|
|
||
| It is small but greater than zero → the typical situation in clouds on Earth. | ||
|
|
@@ -134,9 +134,9 @@ z = 0.0 | |
| e = cᵖᵐ * T + g * z - ℒˡᵣ * qˡ | ||
| ``` | ||
|
|
||
| Moist static energy has units ``\mathrm{m^2 / s^2}``, or ``\mathrm{J}{kg}``. | ||
| Moist static energy has units ``\mathrm{m^2 / s^2}``, or ``\mathrm{J} / \mathrm{kg}``. | ||
| Next we show that the saturation adjustment solver recovers the input temperature | ||
| by passing it an "unadjusted" moisture mass fraction into `compute_temperature`, | ||
| by passing it an "unadjusted" moisture mass fraction into [`Breeze.AtmosphereModels.compute_temperature`](@ref), | ||
|
|
||
| ```@example microphysics | ||
| using Breeze.AtmosphereModels: compute_temperature | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,7 @@ By definition, all of the mass fractions sum up to unity, | |
|
|
||
| so that, using ``qᵗ = qᵛ + qˡ + qⁱ``, the dry air mass fraction can be diagnosed with ``qᵈ = 1 - qᵗ``. | ||
| The sometimes tedious bookkeeping required to correctly diagnose the effective mixture properties | ||
| of moist air are facilitated by Breeze's handy `MoistureMassFractions` abstraction. | ||
| of moist air are facilitated by Breeze's handy [`MoistureMassFractions`](@ref Breeze.Thermodynamics.MoistureMassFractions) abstraction. | ||
| For example, | ||
|
|
||
| ```@example thermo | ||
|
|
@@ -328,7 +328,7 @@ thermo = ThermodynamicConstants() | |
| thermo.molar_gas_constant | ||
| ``` | ||
|
|
||
| `ThermodynamicConstants`, which is central to Breeze's implementation of moist thermodynamics. | ||
| [`ThermodynamicConstants`](@ref), which is central to Breeze's implementation of moist thermodynamics. | ||
| holds constants like the molar gas constant and molar masses, latent heats, gravitational acceleration, and more, | ||
|
|
||
| ```@example thermo | ||
|
|
@@ -480,7 +480,7 @@ cˡ = thermo.liquid.heat_capacity | |
| Δcˡ = cᵖᵛ - cˡ | ||
| ``` | ||
|
|
||
| This difference ``\Delta c^l ≈`` $(round(1885 - 4181, digits=1)) J/(kg⋅K) is negative because | ||
| This difference ``\Delta c^l ≈`` -2296 J/(kg⋅K) is negative because | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ref: #142 (comment)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Now that I look at the rendered code block in https://numericalearth.github.io/BreezeDocumentation/dev/thermodynamics/#Example:-liquid-water-and-ice-parameters, this should have been 2331? That's a bit far from your calculation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see #150 |
||
| water vapor has a lower heat capacity than liquid water. | ||
|
|
||
| ### Mixed-phase saturation vapor pressure | ||
|
|
@@ -535,7 +535,7 @@ pᵛᵐ⁺ = [saturation_vapor_pressure(Tⁱ, thermo, mixed_surface) for Tⁱ in | |
| using CairoMakie | ||
|
|
||
| fig = Figure() | ||
| ax = Axis(fig[1, 1], xlabel="Temperature (ᵒK)", ylabel="Saturation vapor pressure pᵛ⁺ (Pa)", | ||
| ax = Axis(fig[1, 1], xlabel="Temperature (ᵒK)", ylabel="Saturation vapor pressure pᵛ⁺ (Pa)", | ||
| yscale = log10, xticks=200:20:320) | ||
| lines!(ax, T, pᵛˡ⁺, label="liquid", linewidth=2) | ||
| lines!(ax, T, pᵛⁱ⁺, label="ice", linestyle=:dash, linewidth=2) | ||
|
|
@@ -588,7 +588,7 @@ using CairoMakie | |
| fig = Figure(size=(1000, 400)) | ||
|
|
||
| # Panel 1: Saturation vapor pressure | ||
| ax1 = Axis(fig[1, 1], xlabel="Temperature (K)", ylabel="Saturation vapor pressure (Pa)", | ||
| ax1 = Axis(fig[1, 1], xlabel="Temperature (K)", ylabel="Saturation vapor pressure (Pa)", | ||
| yscale=log10, title="Saturation vapor pressure") | ||
|
|
||
| for (i, λ) in enumerate(λ_values) | ||
|
|
@@ -600,7 +600,7 @@ end | |
| axislegend(ax1, position=:lt) | ||
|
|
||
| # Panel 2: Saturation specific humidity | ||
| ax2 = Axis(fig[1, 2], xlabel="Temperature (K)", ylabel="Saturation specific humidity (kg/kg)", | ||
| ax2 = Axis(fig[1, 2], xlabel="Temperature (K)", ylabel="Saturation specific humidity (kg/kg)", | ||
| title="Saturation specific humidity") | ||
|
|
||
| for (i, λ) in enumerate(λ_values) | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.