5
$\begingroup$

I am broadly familiar with the concept of numerical weather prediction models using various finite methods to solve the primitive equations used in these models, but how do spectral methods work, generally speaking?

What are the basic differences between NWP models using "traditional" finite-difference or finite volume methods and those that employ spectral method approaches?

$\endgroup$
7
$\begingroup$

Presume that the atmosphere can be modeled with waves of different frequencies. Therefore, the atmosphere can be written as a series of sine and cosine functions with different frequencies and coefficients. Consider the linear advection equation: $$\frac{\partial u}{\partial t}= -c \frac{\partial u}{\partial x}$$

Consider the assumption that $u$ can be modeled as $$u=\sum^\infty_{|n|=0} A_n(t)\exp(i\omega_n x) $$ But since we have limited computational resources, $$u=\sum^N_{|n|=0} A_n(t)\exp(i\omega_n x) $$ Therefore, our advection equation becomes $$\sum^\infty_{|n|=0} \frac{d A_n(t)}{dt}\exp(i\omega_n x)=-c\sum^\infty_{|n|=0} i \omega_n A_n(t)\exp(i\omega_n x) $$

If we integrate this equation and leverage the orthogonal properties of sine and cosine, $$\int^L_0 \sum^\infty_{|n|=0} \frac{d A_n(t)}{dt}\exp(i\omega_n x)\exp(i\omega_m x)dx=-c\int^L_0 \sum^\infty_{|n|=0} i \omega_n A_n(t)\exp(i\omega_n x)\exp(i\omega_m x)dx$$ Then the summation notation can be removed. $$\frac{d A_m(t)}{dt}=-ic \omega_m A_m(t)$$ Now this can be solved analytically, and as such we do have an analytic solution to the advection equation, but what we can do to model this numerically, is combine the finite difference notation and the spectral solution to numerically integrate the advection equation.

For example, $$u_{n+1}= u_n -c\Delta t\sum^\infty_{|l|=0} i \omega_l A_l(t)\exp(i\omega_l x) $$

So to summarize,

  • Assume that the variable can be expressed as a sum of basis functions, commonly sine and cosine functions.
  • Create a truncated series (fourier series), creating an analytic expression for said quantity.
  • Evaluate the derivative of the truncated series, and replace the derivative (often computed with finite difference approximations) with the analytic representation of the derivative.
  • Numerically integrate in time.

Now there are plenty of limitations, such as the nonlinear version of that equation. If I had my notes on hand, then I could address those problems more. I'll edit this when I can. Also, model physics cannot be computed in spectral space, so there has to be conversion from spectral to physical space and vice-versa.

I'll check my notes and correct any errors I can find later.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.