Solution (source code)

= Solution
{c}

Put $\eta=h-h_0$ and $c=\sqrt{g'h_0}$. With $u=0$ and complex dependence $e^{i(\omega_Kt-\ell_Ky)}$, the northward <momentum> equation and <continuity equation> give
$$
\omega_Kv=\ell_Kg'\eta,\qquad
\omega_K\eta=\ell_Kh_0v.
$$
Thus $\omega_K^2=c^2\ell_K^2$. Write the signed <phase velocity> as $c_y=\omega_K/\ell_K=\pm c$, so $v=(c_y/h_0)\eta$. The eastward <momentum> equation is the transverse <geostrophic balance> $g'\eta_x=f_0v$. Hence
$$
\boxed{A(x)=A_b\exp\left[\frac{f_0}{c_y}(x-x_b)\right],\qquad
\frac{\omega_K}{\ell_K}=c_y=\pm\sqrt{g'h_0}.}
$$
The decaying sign is selected by which side of $x_b$ contains the <ocean>. For an eastern boundary the <ocean> occupies $x<x_b$, so decay offshore requires $f_0/c_y>0$. Consequently the <Kelvin wave> moves northwards in the northern hemisphere and southwards in the southern hemisphere, with the coast respectively on its right and left. The positive offshore decay length is
$$
\boxed{L_d=\frac{\sqrt{g'h_0}}{|f_0|}.}
$$
The sign of $f_0$ reverses the propagation direction and the sign of $v$ relative to $\eta$, but not the speed or offshore decay length. The real physical fields are the real parts of the complex solution. At the equator itself this local <f-plane> coastal solution loses its finite trapping scale.