You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Geometry $2\times2$T-cells with E- and N-edges and U-points
Consider a $2\times2$ grid that consists of grid cell centre locations at T, and then E (eastern) and N (northern) edges, and U (north-eastern) points; all of which define the Arakawa C-grid. Assume the grid is uniform ($dx = dy = 1$). Ice velocity components are computed at u (x-direction) and v (y-direction).
The two classical solid-boundary conditions for velocity in our sea-ice momentum solver, where the land/sea is encoded by face masks on a staggered C-grid:
$m_{E_{i,j}}\in{0,1}$: mask on E (vertical)
$m_{N_{i,j}}\in{0,1}$: mask on N (horizontal)
and $1=\mathrm{ocean}$, $0=\mathrm{land}$
Velocity components are located as usual:
$u_E$ :: normal velocity on E faces,
$v_N$ :: normal velocity on N faces,
$v_E$ :: tangential velocity on E faces,
$u_N$ :: tangential velocity on N faces
Impermeability (always enforced)
Normal flow through land is zero via masking: $$u_E \leftarrow m_E,u_E, \qquad v_N \leftarrow m_N,v_N $$
Using masked neighbors in finite differences ('effective neighbor')
Near the coast, centered differences need a neighbor value that may lie on land. Replace that by an effective neighbor ($q_{\mathrm{nbr}}$) using the face mask $m_{\mathrm{nbr}}$. Let $q$ be the value on the current ocean face and $q_{\mathrm{nbr}}$ the value on the neighbor face in the stencil:
No-slip (Dirichlet): the value at the boundary is prescribed (zero).
If the neighbor is land, use zero (“clamp to zero”): $$q_{\mathrm{nbr}} = m_{\mathrm{nbr}} q_{\mathrm{nbr}} + (1-m_{\mathrm{nbr}})\cdot 0$$
Free-slip (Neumann): the normal derivative is zero at the boundary.
If the neighbor is land, copy the local value (“even reflection”), which makes the discrete normal gradient vanish: $$q_{\mathrm{nbr}} = m_{\mathrm{nbr}} q_{\mathrm{nbr}} + (1-m_{\mathrm{nbr}}) q$$
For a forward/central difference like $(q_{\mathrm{nbr}}-q)\Delta n$, using $q_{\mathrm{nbr}}=q$ gives $\partial q/\partial n\approx 0$ (free-slip), whereas using $q_{\mathrm{nbr}}=0$ enforces a zero value at the wall (no-slip).
Notes
The same pattern applies whether $q$ is a normal component ($u_E$, $v_N$) or a tangential component ($v_E$, $u_N$) used inside strain-rate stencils.
These formulas assume binary masks, but also make sense for fractional cells with $m\in[0,1]$.
In the interior $m_{\mathrm{nbr}}=1$, so $q_{\mathrm{nbr}}=q_{\mathrm{nbr}}$ and the scheme reduces to the usual centered difference.
free-slip and no-slip boundary condition scheme for uniform-east wind forcing on a 12x12 uniform grid
Geometry$2\times2$
T-cells withE- andN-edges andU-pointsConsider a$2\times2$ grid that consists of grid cell centre locations at $dx = dy = 1$ ). Ice velocity components are computed at
T, and thenE(eastern) andN(northern) edges, andU(north-eastern) points; all of which define the Arakawa C-grid. Assume the grid is uniform (u(x-direction) andv(y-direction).Boundary conditions (BCs) and coastal masking
The two classical solid-boundary conditions for velocity in our sea-ice momentum solver, where the land/sea is encoded by face masks on a staggered C-grid:
E(vertical)N(horizontal)and
Velocity components are located as usual:
Efaces,Nfaces,Efaces,NfacesImpermeability (always enforced)
Normal flow through land is zero via masking:
$$u_E \leftarrow m_E,u_E, \qquad v_N \leftarrow m_N,v_N $$
Using masked neighbors in finite differences ('effective neighbor')
Near the coast, centered differences need a neighbor value that may lie on land. Replace that by an effective neighbor ($q_{\mathrm{nbr}}$ ) using the face mask $m_{\mathrm{nbr}}$ . Let $q$ be the value on the current ocean face and $q_{\mathrm{nbr}}$ the value on the neighbor face in the stencil:
No-slip (Dirichlet): the value at the boundary is prescribed (zero).
$$q_{\mathrm{nbr}} = m_{\mathrm{nbr}} q_{\mathrm{nbr}} + (1-m_{\mathrm{nbr}})\cdot 0$$
If the neighbor is land, use zero (“clamp to zero”):
Free-slip (Neumann): the normal derivative is zero at the boundary.
$$q_{\mathrm{nbr}} = m_{\mathrm{nbr}} q_{\mathrm{nbr}} + (1-m_{\mathrm{nbr}}) q$$
If the neighbor is land, copy the local value (“even reflection”), which makes the discrete normal gradient vanish:
Notes
free-slip and no-slip boundary condition scheme for uniform-east wind forcing on a 12x12 uniform grid
free-slip
no-slip
free-slip_uniform-east_preCDP_uv.mp4
no-slip_uniform-east_preCDP_uv.mp4