Deriving the "Thermal wind" equation from the geostropic balance equation The geostrophic balance equation is given by:
$$2 \mathbf{\Omega} \times \mathbf{v} = \mathbf{g}-\frac{1}{\rho}\nabla p$$
with $\mathbf{\Omega}=\Omega \mathbf{\hat{z}}$ and $\mathbf{g}=-g \mathbf{\hat{z}}$
I want to show that
$$\frac{\partial\mathbf{v}_h}{\partial z} \approx \frac{g}{2\Omega} \mathbf{\hat{z}} \times \nabla \ln(T)$$
using the approximation $\nabla p \approx \frac{\partial p}{\partial z}\mathbf{\hat{z}}$ and where $\mathbf{v}_h=(v_x,v_y,0)$
So far starting from the geostrophic balance equation and using the relation $p=R\rho T$ where $R$ is a constant and by taking the curl of the geostropic balance equation I get
$$2\mathbf{\Omega}(\nabla\cdot\mathbf{v})-2(\mathbf{\Omega}\cdot\nabla)\mathbf{v}=-R\nabla T \times \nabla \ln(p)$$
then I can plug in what I know I can arrive at
$$\frac{\partial\mathbf{v_h}}{\partial z}-(\nabla\cdot\mathbf{v}_h)\mathbf{\hat{z}}=-R\nabla T \times \nabla \ln(p)$$
I feel like this is very close but for the life of me I can't see how to get this in the right form any help is much appreciated.
 A: Taking the curl of the geostrophic balance, we get
$$2\tag{1}\nabla \times (\mathbf{\Omega}\times \mathbf{v}) = \nabla \times \mathbf{g} - \nabla \times \left(\frac{1}{\rho} \nabla p \right)$$
Since $\mathbf{g}$ is a constant vector, we have $\nabla \times \mathbf{g} = 0$. Applying product rules for curl  on both sides of (1), we get
$$\tag{2}-2\mathbf{\Omega}\cdot \nabla \mathbf{v} + 2 (\nabla \cdot \mathbf{v})\mathbf{\Omega} = - \nabla\left(\frac{1}{\rho} \right)\times \nabla  p - \frac{1}{\rho} \nabla \times \nabla p = - \nabla\left(\frac{1}{\rho} \right)\times \nabla  p,$$
where the last equality follows because the curl of a gradient ($\nabla \times\nabla p$)  is zero. Substituting with $\mathbf{\Omega} = \Omega \mathbf{\hat{z}}$ and $\mathbf{v} = \mathbf{v}_h$ into (2), we get
$$\tag{3} -2\Omega\,\left ( \frac{\partial \mathbf{v}_h}{\partial z}-  (\nabla \cdot \mathbf{v}_h)\mathbf{\hat{z}}\right) = - \nabla\left(\frac{1}{\rho} \right)\times \nabla  p$$
With the equation of state $p = R\rho T$, it follows that
$$-\nabla \left( \frac{1}{\rho}\right) = \frac{1}{\rho^2} \nabla \rho =  \frac{1}{\rho}\nabla \ln \rho = - \frac{1}{\rho}\nabla \ln T+ \frac{1}{\rho}\nabla \ln p$$
Hence, substituting into (3) along with the approximation $\nabla p = \rho g \mathbf{\hat{z}}, $ justified below, we get
$$\tag{4} \frac{\partial \mathbf{v}_h}{\partial z}  = -\frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln T + \frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln p +  (\nabla \cdot\mathbf{v}_h)\mathbf{\hat{z}}$$
Note that $\mathbf{\Omega}\times \mathbf{v_h} = (0,0,\Omega) \times (v_x,v_y,0) = (-\Omega v_y, \Omega v_x, 0)$ and the components of the geostrophic balance are
$$-2\Omega v_y = - \frac{1}{\rho}\frac{\partial p}{\partial x}, \quad 2\Omega v_x = - \frac{1}{\rho}\frac{\partial p}{\partial y} ,\quad 0 = g - \frac{1}{\rho}\frac{\partial p}{\partial z}$$
Thus,
$$\frac{\partial v_x}{\partial x} = -\frac{1}{2 \Omega}\frac{\partial^2 p}{\partial x \partial y} + \frac{1}{2\Omega \rho^2} \frac{\partial \rho}{\partial x}\frac{\partial p}{\partial y}, \\\frac{\partial v_y}{\partial y} = \frac{1}{2 \Omega}\frac{\partial^2 p}{\partial x \partial y} - \frac{1}{2\Omega \rho^2} \frac{\partial \rho}{\partial y}\frac{\partial p}{\partial x}$$
$$\tag{5}\nabla \cdot \mathbf{v}_h = \frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y} = \frac{1}{2\Omega \rho^2} \left(\frac{\partial \rho}{\partial x}\frac{\partial p}{\partial y}-\frac{\partial \rho}{\partial y}\frac{\partial p}{\partial x}\right)$$
Making the approximation $\nabla p \approx \frac{\partial p}{\partial z} \mathbf{\hat{z}}$, we have $\frac{\partial p}{\partial x}  = \frac{\partial p}{\partial y} \approx 0$ and  substituting into (5), we get $\nabla \cdot \mathbf{v}_h \approx 0$.
With the approximation we can rewrite (4) as
$$\tag{6} \frac{\partial \mathbf{v}_h}{\partial z}  \approx -\frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln T + \frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln p  \\= -\frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln T + \frac{g}{2\Omega p}\mathbf{\hat{z}} \times  \nabla  p  $$
Using  $\frac{\partial p}{\partial z} = \rho g$ from the third component equation along with  the approximation $\nabla p = \frac{\partial p}{\partial z} \mathbf{\hat{z}} $ , we get $\nabla p = \rho g \mathbf{\hat{z}}, $ and, hence,
$$\mathbf{\hat{z}} \times  \nabla  p = \mathbf{\hat{z}} \times (\rho g\mathbf{\hat{z}} ) = 0, $$
and (6) reduces to
$$ \frac{\partial \mathbf{v}_h}{\partial z}  \approx -\frac{g}{2\Omega}\mathbf{\hat{z}} \times  \nabla \ln T$$
