---
# System prepended metadata

title: 2024/03/20
tags: [Atmospheric Dynamics]

---

# 2024/03/20
## Governing equations in isobaric coordinate

### Difference between z- and p-coordinate
||Mass field|Motion field|
|:---:|:---:|:---:|
|z-coord|$p,\;T,\;\rho$|$u, v, w$|
|p-coord|$\Phi,\;T,\;\rho$|$u,v,\omega$|

In p-coordinate, pressure is substituted by geopotential, and vertical velocity is substituted by materal derivative of pressure change.

### Transform between Eulerian and Lagrangian derivatives
In z-coordinate:
$$
    \begin{aligned}
        \frac{DB}{Dt} = \frac{\partial B}{\partial t}+u\frac{\partial B}{\partial x}+v\frac{\partial B}{\partial y}+w\frac{\partial B}{\partial z}
    \end{aligned}
$$

With hydrostatic equation:
$$
\begin{aligned}
    &\frac{DB}{Dt} = \frac{\partial B}{\partial t}+u\frac{\partial B}{\partial x}+v\frac{\partial B}{\partial y}+\frac{\partial z}{\partial p}\frac{\partial p}{\partial t}\frac{\partial B}{\partial p}\frac{\partial p}{\partial z}\\
    \\
    \Rightarrow &\frac{DB}{Dt} = \frac{\partial B}{\partial t}+u\frac{\partial B}{\partial x}+v\frac{\partial B}{\partial y}+\omega\frac{\partial B}{\partial p}
\end{aligned}
$$

where $\omega = \frac{\partial p}{\partial t}$

### Horizontal momentum equation
$$
    \frac{D\vec{U}}{Dt} = -\frac{1}{\rho}\nabla_h p-f\hat{k} \times \vec{U}
$$

With PGF in isobaric system:
$$
    \frac{D\vec{U}}{Dt} = -(\nabla_h \Phi)_p-f\hat{k} \times \vec{U}
$$

For component equation:
$$
\begin{cases}
    & \frac{Du}{Dt} = -\frac{\partial \Phi}{\partial x}+fv\\
    \\
    & \frac{Dv}{Dt} = -\frac{\partial \Phi}{\partial y}-fu 
\end{cases}
$$

For geostrophic wind in p-coordinate:
$$
\begin{cases}
    & 0 = -\frac{\partial \Phi}{\partial x}+fv_g\\
    \\
    & 0 = -\frac{\partial \Phi}{\partial y}-fu_g
\end{cases}    
$$

$$
\begin{cases}
    & u_g = -\frac{1}{f}\frac{\partial \Phi}{\partial x}\\
    \\
    & v_g = \frac{1}{f}\frac{\partial \Phi}{\partial y} 
\end{cases}
$$

For vectorial form:
$$
    \vec{V_g} = -\frac{1}{f}\hat{k}\times(\nabla_h\Phi)_p
$$

### Hydrostatic equation
In z-coordinate:
$$
\begin{aligned}
    &\frac{\partial p}{\partial z} = -\rho g\\
    \\
    \Rightarrow &g\frac{\partial z}{\partial p} = -\alpha = -\frac{RT}{p}\\
    \\
    \Rightarrow &\frac{\partial \Phi}{\partial (lnp)} = -RT
\end{aligned}
$$

### Equation of state
$$
    p = \rho RT
$$

### Continuity equation
In z-coordinate, Eulerian derivation:
$$
    \frac{\partial \rho}{\partial t} + \nabla\cdot(\rho\vec{v}) = 0
$$

or in Lagrangian derivation:
$$
    \frac{D \rho}{D t} + \rho \nabla\cdot(\vec{v}) = 0
$$

In equation, the mass of a parcel is:
$$
    \delta M = \rho\;\delta x\;\delta y\;\delta z
$$

With hydrostatic equation, the mass of parcel can be written as:
$$
    \delta M = -g\;\delta x\;\delta y\;\delta p
$$

Mass is conserved under Lagrangian frame:
$$
\begin{aligned}
    &\frac{1}{\delta M}\frac{D(\delta M)}{Dt} = 0\\
    \Rightarrow & \frac{1}{\delta x}\frac{D(\delta x)}{Dt}+\frac{1}{\delta y}\frac{D(\delta y)}{Dt}+\frac{1}{\delta p}\frac{D(\delta p)}{Dt} = 0 \\
    \Rightarrow & \frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial \omega}{\partial p} = 0\\
    \Rightarrow & \nabla_h\cdot \vec{U}+\frac{\partial \omega}{\partial p} = 0
\end{aligned}
$$

### Thermal equation
In z-coordinate
$$
    C_p \frac{DT}{Dt} -\alpha \frac{Dp}{Dt} = \frac{Dq}{Dt}
$$

With expansion of Eulerian frame in p-coordinate:
$$
\begin{aligned}
    &C_p (\frac{\partial T}{\partial t}+\vec{U}\cdot\nabla T+\omega\frac{\partial T}{\partial p}) -\alpha \frac{Dp}{Dt} = \frac{Dq}{Dt} \\
    \\
    \Rightarrow &(\frac{\partial T}{\partial t}+\vec{U}\cdot\nabla T) - (\frac{\alpha}{C_p}-\frac{\partial T}{\partial p})\omega = \frac{1}{C_p}\frac{Dq}{Dt} \\
    \\
    \Rightarrow &(\frac{\partial T}{\partial t}+\vec{U}\cdot\nabla T) - S_p\omega = \frac{1}{C_p}\frac{Dq}{Dt}
\end{aligned}
$$

where $S_p$ can be regarded as stability in p-coordinate\

## Balanced flow
### Natural coordinate
1. Definition
    ![image](https://hackmd.io/_uploads/B12H6pFR6.png)
    Axis of natural coordinate is tangential and normal to the streamlines, written as $\hat{t}, \hat{n}$, respectively.
    For vertical direction, there is $\hat{k}$-axis, which is defined as:
    $$
        \hat{k} = \hat{t}\times\hat{n}
    $$

2. Relation with Cartesian coordinate:
    ![image](https://hackmd.io/_uploads/ByLn0pYCa.png)
    The relations can be written as:
    $$
        \begin{cases}
            & \hat{t} = <cos\psi, sin\psi>\\
            & \hat{n} = <-sin\psi, cos\psi>\\
        \end{cases}
    $$
    
    This expression shows that the natural coordinate is rotating of Cartesian coordinate.

### Horizontal momentum equation in natral coordinate
In p-coordinate, horizontal momentum equation can be written as:
$$
    \frac{D\vec{U}}{Dt} = -\hat{k}\times(\nabla\vec{U})-\nabla_h \Phi
$$

This equation can be rewritten as:
$$
    \frac{D(U\hat{t})}{Dt} = \frac{DU}{Dt}\hat{t}+U\frac{D\hat{t}}{Dt}
$$

With geometric relation, expression above can be written as:
$$
    \frac{D(U\hat{t})}{Dt} = \frac{DU}{Dt}\hat{t}+\frac{U^2}{R}\hat{n}
$$

where $\frac{U^2}{R}\hat{n}$ is centripetal force.
Also, the Coriolis force in natural coordinate can be written as:
$$
    -f\hat{k}\times{\vec{U}} = -fU\hat{n}
$$

With these equations, there is horizontal momentum equation in natral coordinate:
$$
    \begin{cases}
        &\frac{DU}{Dt} = -\frac{\partial \Phi}{\partial s}\\
        &\frac{U^2}{R}-fU = -\frac{\partial \Phi}{\partial n}
    \end{cases}
$$