Solution (source code)

= Solution

The linearized kinematic condition at the undisturbed surface is
$$
\partial_t\eta=\partial_z\phi\big|_{z=0}.
$$
For the given complex amplitudes this says
$$
-i\omega A=kB,
\qquad
\boxed{B=-\frac{i\omega}{k}A}.
$$

The velocity is $u=(\phi_x,0,\phi_z)$. Its nonzero complex strain amplitudes are
$$
e_{xx}=-k^2Be^{kz},\qquad
e_{zz}=k^2Be^{kz},\qquad
e_{xz}=e_{zx}=ik^2Be^{kz}.
$$
Using the stated rule for period averages,
$$
\langle e:e\rangle=2k^4|B|^2e^{2kz}.
$$
Thus the mean dissipation per unit horizontal area is
$$
\mathcal D
=2\mu\int_{-\infty}^0\langle e:e\rangle\,dz
=2\mu k^3|B|^2
=2\mu k\omega^2|A|^2
=\boxed{2\mu gk^2|A|^2}.
$$
The mean energy $E=\rho g|A|^2/2$ consequently obeys $dE/dt=-\mathcal D$. Writing $\nu=\mu/\rho$ gives the <viscous decay of a deep-water gravity wave>:
$$
\boxed{\frac{d|A|}{dt}=-2\nu k^2|A|},
\qquad
\boxed{|A(t)|=|A(0)|e^{-2\nu k^2t}}.
$$