<p>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}$$</p>

<p>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) $$</p>

<p>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 <em>can</em> 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.</p>

<p>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) $$</p>

<p>So to summarize, </p>

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

<p>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.</p>

<p>I'll check my notes and correct any errors I can find later.</p>

CC BY-SA 3.0
2017-12-12T22:33:18.130Z
2017-12-12T22:33:18.130Z
BarocliniCplusplus
<p>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? </p>

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

<meteorology><weather-forecasting><numerical-modelling><nwp>
How do spectral methods work in the context of numerical weather prediction models?
decvalts
# How do spectral methods work in the context of numerical weather prediction models?

(Asked by: username_0 on 2017-12-12)

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?

**Tags:** meteorology, weather-forecasting, numerical-modelling, nwp


---

## 1 answers

### Answer by username_1 on 2017-12-12. Score: 8

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.


---

