A spectrum, or more correctly Fourier spectrum, is a presentation of the distribution of the energy in a signal with period (or frequency, which is the inverse of period). Traditionally, Fourier spectra are plotted on log-log graphs with frequency on the x-axis and a quantity called "power spectral density" (PSD) on the y-axis. Usually, PSD is scaled so that the area under the curve is equal to the variance of the signal (variance is the standard deviation squared), but sometimes the PSD is scaled so that the area under the spectrum is unity. The spectrum is then called a normalised Fourier spectrum.
Fourier spectra are calculated from a time series using an algorithm called the fast Fourier transform (FFT). The process of getting a spectrum from the time series is quite complicated, involving several pre-processing steps to prepare the time series for the FFT, then several more steps after the FFT. The steps before the FFT include: removing any gaps, removing the linear and quadratic trends, and splitting the record into a number of subsets of equal length. After transforming using the FFT, the data are windowed to remove end effects, averaged over the subsets (known as ensemble averaging), and smoothed (known as frequency averaging).
So much for the definition of a spectrum and how it is calculated, but what good is it?
Here is a typical set of wave spectra from the Triaxys wave buoy at Marsden Point:
The x-axis shows period decreasing to the right, so the part of the spectrum that is swell is to the left
and sea is to the right.
The y-axis shows the energy in various parts of the signal. Notice that the energy extends over 6 decades.
If we were plotting money and the bottom of the axis represented $1, the top would represent $1 billion,
so the plot can show extreme differences in the wave state, from glass-smooth to huge waves.
36 h ago (cyan curve) there was a moderate swell and very light sea, and that had been the case for the
12 h before that (magenta curve), but 24 h ago (green curve) local winds generated a large, choppy sea
with waves of about 3 s period. Then, 12 h ago there was a 100-fold increase in the energy in waves between 4 and 6 s.
Meantime, the swell has gradually built up since 36 h ago.
Here is a different spectral presentation.
This is a contour plot of spectral energy, as shown in the colour bar to the right.
This time, the x-axis is time and the y-axis is period, so the plot shows how the
spectrum has developed with time.
In this case it shows how the energy in the sea waves has increased with time and with period,
and how the energy in the swell has gradually increased with time.
The white strips are missing data.