Fluids Euler's Equation

Small-amplitude two-dimensional waves disturb the free surface of an incompressible, irrotational fluid with a pressure p(x, y, t) and a velocity potential φ(x, y, t) which satisfies Laplace’s equation. The free surface, given by y = η(x,t), is at constant atmospheric pressure pa and the fluid is of infinite depth.
In terms of φ and η, what is the kinematic boundary condition at the free surface? Starting from the Euler equations, show that φ may be chosen such that
$$\frac{∂φ}{∂t}+\frac{1}{2}|∇φ|^2+gy+\frac{p−p_a}{\rho} =0$$

Euler equation:$$\frac{∂\mathbf u}{∂t}+(\mathbf u \bullet\nabla)\mathbf u= -\frac{1}{\rho}\nabla p+\mathbf g$$$$\nabla\bullet\mathbf u=0$$

I know represent $\mathbf u$ by φ but how should I use $p_a$?

Solutions Collecting From Web of "Fluids Euler's Equation"

The answer to this question uses a fundamental formula of vector calculus. One has
$$({\bf u}\cdot\nabla){\bf u}= \frac{1}{2}\nabla(|{\bf u}|^2) -{\bf u}\times(\nabla\times{\bf u}).$$
In this case one has a potential $\varphi$ for the velocity field and then
$$({\bf u}\cdot\nabla){\bf u}=\frac{1}{2}\nabla(|\nabla\varphi|^2).$$
We note also that, being the velocity field irrotational ($\nabla\cdot{\bf u}=0)$, one gets immediately that
$$\nabla\cdot(\nabla\varphi)=\Delta_2\varphi=0.$$
Now, using the Euler equation we get
$$\frac{\partial}{\partial t}\nabla\varphi+\frac{1}{2}\nabla(|\nabla\varphi|^2)=-\frac{\nabla p}{\rho}+{\bf g}.$$
We are almost done, we just have to notice that
$${\bf g}=-\nabla U$$
with $U=gy$ and that $\rho$, the density, is assumed to be a constant. Then, we get
$$\nabla\left(\frac{\partial\varphi}{\partial t}+\frac{1}{2}|\nabla\varphi|^2+\frac{p}{\rho}+gy\right)=0.$$
Upon integration, this is the desired result provided we add an integration constant $-p_a/\rho$ to agree with the boundary requirements.