Solution (source code)

= Solution

With the free-surface elevation denoted by $\zeta$, the rotating <shallow water equations> over a fixed bottom are
$$
\frac{D_Hu}{Dt}-fv=-g\zeta_x,\qquad
\frac{D_Hv}{Dt}+fu=-g\zeta_y,\qquad
h_t+\partial_x(hu)+\partial_y(hv)=0,
\quad h=h_{00}+\zeta-b.
$$
The momentum gradient is that of the surface elevation, not depth alone; bottom slope enters through the depth and continuity equation. Taking $\partial_x$ of meridional momentum minus $\partial_y$ of zonal momentum gives the <vorticity equation>
$$
\frac{D_H\omega_r}{Dt}+(f+\omega_r)\nabla_H\cdot\mathbf u_H=0,
\qquad \omega_r=v_x-u_y.
$$
The terms quadratic in velocity gradients combine into $\omega_r\nabla_H\cdot\mathbf u_H$; the constant <Coriolis parameter> contributes $f\nabla_H\cdot\mathbf u_H$. Continuity gives $D_Hh/Dt=-h\nabla_H\cdot\mathbf u_H$. Dividing the two equations proves the exact <shallow-water potential vorticity> invariant
$$
\boxed{\frac{D_H}{Dt}\left(\frac{f+\omega_r}{h}\right)=0.}
$$

For the <quasi-geostrophic approximation>, let $U_s$ and $\ell$ be representative velocity and horizontal length scales. Require the <Rossby number> $\mathrm{Ro}=U_s/(|f|\ell)\ll1$, a shallow layer, and slow evolution on time $\ell/U_s$. Put $L_R=\sqrt{gh_{00}}/|f|$ and assume $\mathrm{Bu}=(L_R/\ell)^2$ is order one. Leading momentum then gives <geostrophic balance>, and a <quasi-geostrophic streamfunction> can be chosen as
$$
\psi=\frac g f\zeta,\qquad u_g=-\psi_y,\quad v_g=\psi_x.
$$
Its surface-height scale satisfies $|\zeta|/h_{00}=O(\mathrm{Ro}/\mathrm{Bu})\ll1$. Take the bottom-height ratio of the same small order, with gentle slopes, so $\eta=\zeta-b$ obeys $|\eta|/h_{00}\ll1$. Relative vorticity is order $\mathrm{Ro}f$, and expanding the exact <potential vorticity> gives
$$
\frac{f+\omega_r}{h}
=\frac f{h_{00}}+\frac1{h_{00}}\left(\nabla_H^2\psi-\frac\psi{L_R^2}+\frac f{h_{00}}b\right)+\text{higher orders}.
$$
Because the leading geostrophic velocity is horizontally nondivergent, ageostrophic advection of the anomaly is one order smaller. At the first evolving order the <shallow-water quasi-geostrophic potential vorticity> equation is
$$
\boxed{Q_t+J(\psi,Q)=0,\qquad
Q=\nabla_H^2\psi-L_R^{-2}\psi+\frac f{h_{00}}b,\qquad
J(\psi,Q)=\psi_xQ_y-\psi_yQ_x.}
$$
The constant reference $f/h_{00}$ has zero gradient and drops out. These assumptions also require all topographically induced velocities to retain a small <Rossby number>; the small bottom-height condition alone is not a full justification of quasi-geostrophic balance.

The uniform eastward current has $\psi_0=-Uy$ up to an additive constant, so $\zeta_0=-(fU/g)y$. With $b_0=-(fU/g)y$, surface and bottom slopes are equal and $h=h_{00}$. Its relative vorticity vanishes and $Q_0=0$. This sloping background is used locally where its surface and bottom departures remain within the small-height regime.

Add the compact ridge and set $\psi=-Uy+\phi(x)$. Then $u=U$, $v=\phi'(x)$, and $Q$ depends only on $x$. The steady equation becomes $UQ_x=0$. Uniform incoming <potential vorticity> fixes that constant to zero, giving the <cosine-ridge shallow-water geostrophic response>
$$
\boxed{\phi''-L_R^{-2}\phi=-\frac f{h_{00}}\widehat b(x),\qquad\phi\to0\text{ as }|x|\to\infty.}
$$
Let $a=\pi L/2$, $\lambda=L_R^{-1}$ and
$$
A=\frac{f\epsilon/h_{00}}{L^{-2}+L_R^{-2}}.
$$
The forcing is even, so the decaying response is even. A cosine particular solution inside the ridge leaves an even homogeneous term; outside, retain only the decaying exponential. Since the forcing is bounded and contains no delta function, both $\phi$ and $\phi'$ are continuous at the edges. Write $\phi=A\cos(x/L)+D\cosh(x/L_R)$ inside and $\phi=B e^{-(|x|-a)/L_R}$ outside. Matching at $x=a$ gives
$$
B=D\cosh(a/L_R),\qquad
-A/L+(D/L_R)\sinh(a/L_R)=-B/L_R.
$$
Solving yields $D=A(L_R/L)e^{-a/L_R}$, hence
$$
\boxed{\phi(x)=
\begin{cases}
A\left[\cos(x/L)+\dfrac{L_R}{L}e^{-a/L_R}\cosh(x/L_R)\right],&|x|\le a,\\
A\dfrac{L_R}{L}e^{-a/L_R}\cosh(a/L_R)e^{-(|x|-a)/L_R},&|x|\ge a.
\end{cases}}
$$
A globally decaying homogeneous solution that is continuously differentiable is zero, so this matched solution is unique.

A steady <streamline> is a constant-$\psi$ curve. If its upstream ordinate is $y_\infty$, it therefore has
$$
\boxed{y(x)=y_\infty+\frac{\phi(x)}U.}
$$
For $f>0$, $\phi$ is positive: the flow first turns toward increasing $y$, passes the crest at its largest deflection, then returns to its upstream ordinate. Reversing the sign of $f$ reverses the deflection. For $L=3L_R$, the center deflection is $A[1+e^{-3\pi/2}/3]/U$ and each tail decays on scale $L_R$. The figure shows several streamlines and the ridge support; the deflection extends beyond the ridge.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2003/iii/paper-72-ridge.png]
{title=Quasi-geostrophic streamlines over a compact cosine ridge with L equal to three Rossby deformation radii}

One compatible realization of the initial condition has $h(x)=h_{00}-\widehat b(x)$ and $\zeta=b_0(y)$. Its stated zonal velocity then satisfies $u(x)h(x)=Uh_{00}$, so the initial mass flux is constant and $v=0$. The data given only far upstream do not uniquely determine the initial height everywhere; this is the natural mass-flux-compatible choice. It is not fully balanced over the ridge: $fu(x)$ differs from $-g\zeta_y=fU$. The resulting transverse acceleration initiates <geostrophic adjustment> and launches fast <inertia-gravity waves>.

Initially the relative vorticity is zero, but exact <shallow-water potential vorticity> is $f/[h_{00}-\widehat b(x)]$, not the uniform upstream value. That localized anomaly is materially transported downstream, approximately at $U$ in the leading <quasi-geostrophic approximation>; it is not annihilated by adjustment. Fresh incoming parcels of uniform PV subsequently supply the ridge region, whose balanced <potential-vorticity inversion> approaches the steady solution above. The fast waves can carry unbalanced energy away on the inertia-gravity time scale, short compared with the advective time at small <Rossby number>. In an open domain this can leave the local balanced response; an ideal closed or reflecting domain need not settle monotonically, because undamped waves can return. Radiation, advection of the initial PV anomaly, and any weak damping must be distinguished from irreversible loss of PV.