Skip to content

Commit

Permalink
docs suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
haakon-e committed Mar 14, 2024
1 parent 2e02492 commit 444e046
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions docs/src/IceNucleationParcel0D.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,46 +353,46 @@ Three different implementations of this parametrization are used in the parcel m
with the mean and standard deviation defined in [Frostenberg2023](@cite).
The inverse timescale of the process is set by ``\gamma``.

The stochastic implementation is based on the equation for a generic
stochastic process ``x`` with Gaussian random noise (i.e. Wiener process):
The stochastic implementation is based on the [Ornstein-Uhlenbeck process](https://en.wikipedia.org/wiki/Ornstein–Uhlenbeck_process),
in which the variable ``x`` is a mean-reverting process perturbed by Gaussian random noise (i.e. Wiener process):
```math
\begin{equation}
dx = - \gamma \; x \; dt + g dW; \;\;\;\;\;\;\; dW = {\bf{N}}(0, dt^2),
dx = - \gamma(x - \mu)dt + \sqrt{2\gamma} \sigma dW; \quad\quad dW \sim \mathcal{N}(0, dt),
\end{equation}
```
where ``\bf{N}`` is the normal distribution.
For constant ``\gamma`` and ``g``, ``x`` has solution
where ``\mathcal{N}`` is the normal distribution.
For constant ``\gamma`` and ``\sigma``, and given some initial ``x(0)=x_0``, ``x`` has the analytical solution:
```math
\begin{equation}
x(t) = x_0 \; e^{-\gamma t} + g \; \int_0^t e^{\gamma(s-t)} dW
x(t) =
x_0 e^{-\gamma t} + \mu (1 - e^{-\gamma t})
+ \sqrt{2\gamma} \sigma \int_0^t e^{-\gamma(t-s)} dW,
\end{equation}
```
where ``1/\gamma`` is the assumed timescale of the process.
We can calculate the variance ``\bf{V}`` as,
where ``\tau \equiv \tfrac{1, \gamma}`` is the assumed timescale of the process.
We can calculate the variance ``\mathbb{V}(t) = \langle x_t^2 \rangle`` as,
```math
\begin{equation}
{\bf{V}}(t) = g^2 \int_0^t e^{2\gamma(s-t)} ds = \frac{g^2}{2\gamma}(1 - e^{-2\gamma t}).
\mathbb{V}(t)
= 2\gamma \sigma^2 \int_0^t e^{-2\gamma(t-s)} ds
= \frac{g^2}{2\gamma} \left( 1 - e^{-2\gamma t} \right).
\end{equation}
```

We use this process to model ``x=\log(\text{INPC})``,
which tends toward the mean ``\mu(T)``.
If we denote ``\tau = 1 / \gamma`` as the process timescale and
``\sigma = g / \sqrt{2 / \gamma}`` as the process uncertainty,
then
We use this process to model ``x=\log(\text{INPC})``, which tends toward a temperature-dependent mean value ``\mu(T)``.
The equation for ``\log(\text{INPC})`` is then,`
```math
\begin{equation}
\frac{d\log(\text{INPC})}{dt} = - \frac{\log(\text{INPC}) - μ}{\tau} + \sigma \sqrt{\frac{2}{\tau \; dt}} \; {\bf{N}}(0, 1))
d\log(\text{INPC}) =
- \frac{\log(\text{INPC}) - μ}{\tau} dt
+ \sigma \sqrt{\frac{2dt}{\tau}} \mathcal{N}(0, 1)
\end{equation}
```

The following plot shows resuls of the parcel model with the `mean` (black line),
`random` (dotted lines) and `stochastic` (solid lines) parameterization options.
We show results for two sampling intervals ``\Delta t`` (random),
two process time scales ``\tau`` (stochastic),
and two model time steps `dt`.
The following plot shows resuls of the parcel model with the `mean` (black line), `random` (dotted lines) and `stochastic` (solid lines) parameterization options.
We show results for two sampling intervals ``\Delta t`` (random), two process time scales ``\tau`` (stochastic), and two model time steps `dt`.

```@example
include("../../parcel/Example_Frostenberg_Immersion_Freezing.jl")
include("../../parcel/Example_Frostenberg_Immersion_Freezing.jl");
```
![](frostenberg_immersion_freezing.svg)

0 comments on commit 444e046

Please sign in to comment.