The Ekman Layer
Since the fluid is homogeneous (constant density $\rho$)
$$
\frac{\partial}{\partial z}\!\left(\frac{\partial p}{\partial x}\right)
= \frac{\partial}{\partial x}\!\left(\frac{\partial p}{\partial z}\right) = \frac{\partial}{\partial y}\!\left(\frac{\partial p}{\partial z}\right) = 0 \Rightarrow \frac{\partial}{\partial z}\left(\frac{\partial p}{\partial x}\right)
= \frac{\partial}{\partial z}\left(\frac{\partial p}{\partial y}\right) = 0
$$
This means the horizontal pressure gradient is independent of $z$, so the same $\partial p / \partial x$ and $\partial p / \partial y$ apply throughout the fluid column
At $z \to \infty$, from boundary conditions $
\boxed{
u = U, v = 0, w = 0
(z \to \infty)}$
$$
u \to U, \quad v \to 0
$$
Thus, the $x$- and $y$-momentum balances give
$$
0 = -\frac{1}{\rho}\frac{\partial p}{\partial x},
\qquad
fU = -\frac{1}{\rho}\frac{\partial p}{\partial y}
$$
The horizontal pressure gradient is set by the geostrophic velocity $U$ far from the boundary
Since the horizontal pressure gradient does not depend on $z$, \(\boxed{0 = -\frac{1}{\rho}\frac{\partial p}{\partial x},
fU = -\frac{1}{\rho}\frac{\partial p}{\partial y}}\) must hold for all $z$, not just at infinity
Rewrite the horizontal momentum equations as
$$
f \tilde{u} = A_v \frac{d^2 \tilde{v}}{dz^2},
\qquad
-f \tilde{v} = A_v \frac{d^2 \tilde{u}}{dz^2}
$$
$$
\tilde{u} = u - U,
\quad
\tilde{v} = v
$$
are the departures from geostrophic flow induced by friction and the rigid boundary
- If $A_v = 0$ (no vertical viscosity), then
$\tilde{u} = \tilde{v} = 0$, meaning the flow is purely geostrophic everywhere
- If $A_v \neq 0$, viscosity allows vertical shear and Ekman spiral structure