The averaged Lagrangian for the Stokes' wave (REF )–() is calculated
by substituting this weakly nonlinear wave into the Lagrangian (REF ) and averaging by integrating over
a period, that is integrating in \(\varphi \)  from 0 to \(2\pi \) . In conjunction with the Madelung transformation
(REF ), a pseudo-phase \(\psi \)  is introduced for the mean flow \(\bar{v}\)  with \(\gamma = -\psi _{z}\)  and
\(\bar{v} = \psi _{x}\) , as is standard for Whitham modulation theory, in particular for the modulation equations
for the KdV equation [1]}, [2]}. This results in the consistency equation
\(\frac{\partial \bar{v}}{\partial z} + \frac{\partial \gamma }{\partial x} = 0,\) 
