Solution (source code)

= Solution

Per unit horizontal area, the linear shallow-<water> kinetic and gravitational potential energies are
$$
\mathcal K=\tfrac12\rho H(u^2+v^2),\qquad
\mathcal P=\tfrac12\rho g\eta^2.
$$
For the Kelvin mode, $u=0$ and $v=(c/H)\eta$ with $c^2=gH$. Therefore $H v^2=g\eta^2$, and the two energies are actually equal pointwise at this order. For a harmonic wave $\eta=A_0e^{-r/L_R}\cos(ky-\omega t)$,
$$
\boxed{\overline{\mathcal K}=\overline{\mathcal P}
=\frac{\rho gA_0^2}{4}e^{-2r/L_R}.}
$$
The averaging supplies $\overline{\cos^2}=1/2$. These energies refer to the perturbation relative to the flat resting state; background ocean <potential energy> is not included.