## What is SPOD?

**Spectral Proper Orthogonal Decomposition (SPOD)** is a modal analysis
tool Taira et al 2017, that allows
**extracting spatio-temporal coherent patterns** in **ergodic data**.
Its name, SPOD, was first conied by
Picard and Delville 2000,
and goes back to the original work by
Lumley 1970.
SPOD has been extensively used in the past few years to identify spatio-temporal
coherent patterns in a variety of datasets, mainly in the fluidmechanics
and climate communities. In fluidmechanics it was applied to jets
Schmidt et al. 2017,
wakes Araya et al. 2017, and boundary
layers Tutkun and George 2017,
among others, while in weather and climate it was applied to ECMWF reanalysis
datasets under the name Spectral Empirical Orthogonal Function, or SEOF,
Schmidt et al. 2019,
Lario et al. 2022.

The SPOD approach targets **statistically stationary problems** and involves
the **decomposition** of the **cross-spectral density matrices**. This means
that the SPOD leads to a set of spatial modes that oscillate in time at
a single frequency and that optimally capture the variance of an ensemble
of stochastic data Towne et al. 2018.
Therefore, given a dataset that is statistically stationary, one is able
to capture the optimal spatio-temporal coherent structures that explain
the variance in the dataset.

This can help identifying **relations between multiple variables** or
understanding the **reduced order behavior** of a given phenomenon of
interest. SPOD represents a powerful tool for the **data-driven analysis**
of **nonlinear dynamical systems**. The SPOD approach shares some relationships
with the dynamic mode decomposition (DMD), and the resolvent analysis,
Towne et al. 2018, that are
also widely used approaches for the data-driven analysis of nonlinear
systems. SPOD can be used for both **experimental** and **simulation data**,
and a general description of its key parameters can be found in
Schmidt and Colonius 2020.

## What do we implement?

In PySPOD, we implement two versions, the so-called **batch algorithm**
Towne 2018,
and the **streaming algorithm**
Schmidt and Towne 2019,
both parallel and distributed via mpi4py.

The two versions are based on their Matlab serial implementation:

The figures below show the two algorithms. For more algorithmic details please refer to Schmidt and Towne 2019.

Batch algorithm. Figure from Schmidt and Towne 2019. | Streaming algorithm. Figure from Schmidt and Towne 2019. |

We additionally implement the calculation of time coefficients
*a* and the reconstruction of the solution, given a set of modes
$\phi$ and coefficients *a*, as explained in e.g.,
Lario et al. 2022.

To see how to use the **PySPOD** package, you can look at the
**Tutorials**.

## What data can we apply SPOD to?

SPOD can be applied to wide-sense stationary data, that is ergodic
processes. Examples of these arise in different fields, including
fluidmechanics, and weather and climate, among others. An example
of ergodic data can be found in **Tutorial 1**,
and **Tutorial 2**.