Stand With Ukraine

Thursday, June 18, 2026

Zero-flow ocean boundary condition at the land-ocean interface

Recently, I was reading NEMO (Nucleus for European Modelling of the Ocean) manual, trying to fill in some blanks, as part of my professional development time. In the early pages, as it often happens to me, I got curious about the ocean-land boundary condition imposed on the ocean near its bottom, where water is limited by the land. In the manual it was given without derivation as:

$$ w = -(\vec{U}_h, \nabla_h H(x, y)) $$

where $\vec{U}_h$ - is the horizontal component of the ocean velocity, and $w$ - is the vertical component of the ocean velocity, $H(x, y)$ - is the ocean depth (aka bathymetry) at a point with coordinates $(x, y)$.

Below is the derivation, I've managed to come up with for this formula.

For each point on the surface $z=-H(x, y)$ we have a radius vector pointing from the origin of the coordinate system to any given point on $H(x, y)$ let's denote the radius vector as $\vec{r} = \vec{r}\left(x, y, z\right)$.

Let's also note that the total (3D) velocity of the ocean is $\vec{v} = \vec{U}_h + w \vec{k}$.

Where $\vec{k}$ is the unit vector (i.e $\left(\vec{k}, \vec{k}\right) = \left|\vec{k}\right|^2 = 1$) parallel to the vertical $z$-axis. Note that here our vertical axis is pointing upward, to be consistent with the NEMO documentation.

Now the zero-flow condition through the ocean-land interface means that the projection of the total ocean velocity on the normal to the interface surface is 0:

$$ (\vec{v}, \vec{n}) = 0 $$

To find the expression for $\vec{n}$ we can use a vector product of $\partial_x \vec{r}$ and $\partial_y \vec{r}$, as these are tangent to $H(x,y)$ along the $x$ and $y$ axis respectively. Therefore,

$$ \vec{n}=[\partial_x \vec{r}, \partial_y \vec{r}] $$

we can expand the vector product as follows, using a determinant of the matrix below:

\begin{split} & \vec{n} & \; = \;&\begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ 1 & 0 & -\partial_x H(x, y) \\ 0 & 1 & -\partial_y H(x, y) \end{vmatrix} = \vec{i}\, \partial_x H(x, y) + \vec{j}\,\partial_y H(x, y) + \vec{k} =\\ \\ & & \; = \; & \nabla H (x, y) + \vec{k}\\ \end{split}

Now when we plug the expressions above for $\vec{v}$ and $\vec{n}$ into the scalar product $(\vec{v}, \vec{n})$ we get:

\begin{align*} (\vec{v}, \vec{n}) & = \left(\vec{U}_h + w \vec{k}, \nabla H (x, y) + \vec{k} \right) \\ & = \left(\vec{U}_h, \nabla H (x, y)\right) + \left(\vec{U}_h, \vec{k}\right) + \left(w \vec{k}, \nabla H (x, y)\right) + w \\ & = \left(\vec{U}_h, \nabla H (x, y)\right) + w = 0 \\ \end{align*}

Above we used $\left(\vec{U}_h, \vec{k}\right)=0$ and $\left(w \vec{k}, \nabla H (x, y)\right) = 0$, since the scalar products of perpendicular vectors is 0.

Therefore, finally we can write the desired boundary condition as follows:

$$ \boxed{ w = -\left(\vec{U}_h, \nabla H (x, y)\right) }. $$