The fortran code is here:
svn checkout http://code.google.com/p/guillaumemaze/source/browse/trunk/fortran/WSEdecomp gmaze_WSEdecomp
The Matlab version here:
Direct to the file:
Matlab or at Matlab Central:
We can express a variable as a sum of Fourier harmonics:
and from them
we can separate standing, eastward and westward propagating parts of a (longitude,time) signal,
First, for each time of the record we compute cosine and sine coefficients from Fourier
decomposition of the variable, ie we express as:
Next, for each point we compute cosine and sine coefficients from the Fourier decomposition of
A and B:
and following the notation from Park et al. (2004):
with the westward/eastward sine and cosine coefficients:
and phases of East and West waves: , .
We can rewrite equation 5 in the more significative form:
where we can identify West/East waves having amplitude , and phase lags , .
We state that a stationnary wave is the sum of an eastward and a westward wave having the same amplitude. This allow us to rewrite expression 6 separating standing from propagating (eastward or westward, it depends on the relative amplitude of each part) wave components.
and if :
We reconstruct the signal by summing harmonics over the two directions and but doing it separetly for each wave components (according to equation 7 and 8 discrimination) allow separation of the signal into its 3 wave parts. Remark that restricting the summation over a selected range in space and time allow 2D filtering of the signal.
Finally, this method allow to plot a very powerfull diagram: a 2D power spectral density. Contours of amplitudes and in the (,) plan can show waves properties. Pics in only one part of the plan (westward side or eastward side) stands for a propagating wave and identical pics in both sides stand for a stationnary wave.