Discretization in spectral space

The fluxes in the spectral space $(\sigma,\theta)$, as given in Eq. (3.2), should not be approximated with the first order upwind scheme since, it turns out to be very diffusive for frequencies near the blocking frequency3.2. Central differences should be used because of second order accuracy. However, such schemes tend to produce unphysical oscillations due to relatively large gradients in action density near the blocking frequency. Instead, a hybrid central/upwind scheme is employed:


  $\displaystyle c_\sigma N\vert _{i,j,l+1/2,m} = \left\{
\begin{array}{l}
(1 - ...
...uad \mbox{\footnotesize if shifting to lower frequencies}
\end{array} \right.
$ (3.20)



and


  $\displaystyle c_\theta N\vert _{i,j,l,m+1/2} = \left\{
\begin{array}{l}
(1 - ...
...{i,j,l,m}\,,
\quad \mbox{\footnotesize if clockwise}
\end{array} \right.\, ,
$ (3.21)



where the parameters $\mu$ and $\nu$ are still to be chosen. For all values $\mu \in [0,1]$ and $\nu \in [0,1]$, a blended form arises between first order upwind differencing ($\mu = \nu = 0$) and central differencing ($\mu = \nu = 1$). Like the fluxes in the geographical space, both fluxes at $(i,j,l+1/2,m)$ and $(i,j,l-1/2,m)$ acts together with the same sign of $c_\sigma$. The same holds for fluxes at $(i,j,l,m+1/2)$ and $(i,j,l,m-1/2)$ acting together with the same sign of $c_\theta $. Note that the above scheme is flux conservative and thus suitable for cases with rapidly varying bathymetry.


Let us consider a few examples for the purpose of the last term of Eq. (3.1), i.e. the refraction term. We substitute approximation (3.21) in the last term of Eq. (3.2), and central differences ($\nu = 1$) yields (keep in mind that bin $m$ is the bin of consideration for the approximation of this refraction term)


  $\displaystyle \left( \frac{(c_\theta N)_{m+1} - (c_\theta N)_{m-1}}{2\Delta \theta} \right)^{n}_{i, j, l}
$ (3.22)



whereas for the counter-clockwise case $c_{\theta}\vert _m > 0$ and $c_{\theta}\vert _{m-1} > 0$, first order upwinding ($\nu = 0$) returns


  $\displaystyle \left( \frac{(c_\theta N)_{m} - (c_\theta N)_{m-1}}{\Delta \theta} \right)^{n}_{i, j, l}
$ (3.23)



and for the clockwise case $c_{\theta}\vert _{m+1} < 0$ and $c_{\theta}\vert _{m} < 0$, we have


  $\displaystyle \left( \frac{(c_\theta N)_{m+1} - (c_\theta N)_{m}}{\Delta \theta} \right)^{n}_{i, j, l}
$ (3.24)



It is important to note that we consider the flux $c_\theta N$ as one single quantity defined in directional bins only. Suppose that the divergence of this flux is zero. Applying the above upwind approximations implies that the wave action flux is constant in every directional bin. Hence, this upwind scheme ($\nu = 0$) preserves exactly the constancy of this flux. This is called pointwise conservation. Note that this scheme also preserves causality. Although the central difference scheme ($\nu = 1$) is flux conservative, it is not pointwise conservative. Furthermore, due to the nature of this approximation a checkerboard problem may arise. Therefore, in practice, we always choose $0 \leq \nu < 1$ in SWAN.


The usual choice in SWAN is $\nu = \frac{1}{2}$. This approximation contains three consecutive transport velocities which can either be positive or negative. In other cases, they are negligibly small (zero crossing), for which central differences ($\nu = 0$) will then be applied (no clear wave direction). We first consider the counter-clockwise case $c_\theta\vert _{m+1} > 0$, $c_\theta\vert _{m} > 0$ and $c_\theta\vert _{m-1} > 0$, and the associated approximation then reads


  $\displaystyle \left( \frac{(c_\theta N)_{m+1} + 2 (c_\theta N)_{m} -3 (c_\theta N)_{m-1}}{4\Delta \theta} \right)^{n}_{i, j, l}
$ (3.25)



This choice has a smaller amount of numerical diffusion than the upwind scheme, but may create wiggles, albeit small. This asymmetric approximation, containing three distinctive fluxes, indicates that the waves are turning counter-clockwise where both bins $m$ and $m+1$ are receiving energy from the bin $m-1$. However, bin $m+1$ receives less energy than bin $m$. Hence, it slows down the turning of the waves. Since the downstream bin $m+1$ receives some energy, this scheme violates causality. Furthermore, although this scheme is flux conservative, it is not pointwise conservative, i.e. the energy flux may not remain constant in each directional bin. The other case is the clockwise one, i.e. $c_\theta\vert _{m+1} < 0$, $c_\theta\vert _{m} < 0$ and $c_\theta\vert _{m-1} < 0$. For this case, the approximation is given by


  $\displaystyle \left( \frac{3 (c_\theta N)_{m+1} - 2 (c_\theta N)_{m} - (c_\theta N)_{m-1}}{4\Delta \theta} \right)^{n}_{i, j, l}
$ (3.26)






Note that changes in wave action from one spectral bin to another are usually small, at least away from blocking frequency and considering broad wave spectra, so that both the numerical dispersion and diffusion produced by the hybrid scheme and its lack of causality preservation is likely to be much less significant.

The SWAN team 2024-09-09