The equations for the total flow are
Continuity equation
$$
\nabla \cdot \mathbf{u} = 0
$$
Horizontal momentum equations
$
\begin{aligned}
&\frac{D u}{D t}-f v=-\frac{1}{\rho_{0}}\frac{\partial p'}{\partial x}
+\nu_H\!\left(\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}\right)
+\nu_V\!\left(\frac{\partial^2 u}{\partial z^2}\right)\\
&\frac{D v}{D t}+f u=-\frac{1}{\rho_{0}}\frac{\partial p'}{\partial y}
+\nu_H\!\left(\frac{\partial^2 v}{\partial x^2}+\frac{\partial^2 v}{\partial y^2}\right)
+\nu_V\!\left(\frac{\partial^2 v}{\partial z^2}\right)\\
&\frac{D w}{D t}=-\frac{1}{\rho_{0}}\frac{\partial p'}{\partial z}
-\frac{g\rho'}{\rho_{0}}
+\nu_H\!\left(\frac{\partial^2 w}{\partial x^2}+\frac{\partial^2 w}{\partial y^2}\right)
+\nu_V\!\left(\frac{\partial^2 w}{\partial z^2}\right)
\end{aligned}
\;\xrightarrow[\text{frictionless}]{\text{negligible $w$}}\;
\begin{aligned}
\frac{D u}{D t}-f v&=-\frac{1}{\rho_{0}}\frac{\partial p'}{\partial x}\\
\frac{D v}{D t}+f u&=-\frac{1}{\rho_{0}}\frac{\partial p'}{\partial y}
\end{aligned}
$
Vertical hydrostatic equilibrium
$$
\frac{d p}{d z} = - \rho g
$$
Density equation
$$
\frac{D \rho}{D t} \equiv \frac{\partial \rho}{\partial t} + \mathbf{u} \cdot \nabla \rho = 0
$$
The total flow is assumed to be composed of an eastward wind $U(z)$ in geostrophic equilibrium with the basic density structure $\bar{\rho}(y, z)$, plus perturbations
$$
u = U(z) + u'(x,t), \quad
v = v'(x,t), \quad
w = w'(x,t), \quad
\rho = \bar{\rho}(y,z) + \rho'(x,t), \quad
p = \bar{p}(y,z) + p'(x,t)
$$
The basic flow is in geostrophic and hydrostatic balance
$$
f U = - \frac{1}{\rho_0} \frac{\partial \bar{p}}{\partial y},
\qquad
0 = -\frac{\partial \bar{p}}{\partial z} - \bar{\rho} g
$$
Eliminating the pressure, we obtain the thermal wind relation
$$
\frac{d U}{d z} = \frac{g}{\rho_0 f} \frac{\partial \bar{\rho}}{\partial y}
$$
which requires the eastward flow to increase with height because $\partial \bar{\rho} / \partial y > 0$
◀
▶