Harmonic Analysis: From Observations to Constituents#
Harmonic analysis is the inverse of tidal prediction: given a time series of observed sea levels, the goal is to recover the amplitudes and phase lags of the tidal constituents. This section presents the mathematical formulation implemented in PyFES.
The Observation Equation#
At discrete observation times \(t_j\) (\(j = 1, \ldots, M\)), the observed sea level can be modelled as a sum of \(N\) tidal constituents plus a residual:
where:
\(S_0\) is the mean sea level,
\(a_k\) and \(b_k\) are the in-phase and quadrature components of constituent \(k\),
\(V_k(t_j)\) is the astronomical argument of constituent \(k\) at time \(t_j\) (it already contains the term \(\omega_k t_j\)),
\(f_k\) and \(u_k\) are the nodal corrections (see Nodal Corrections: Amplitude and Phase Modulations),
\(\varepsilon_j\) is the residual (noise, meteorological effects, etc.).
The unknown parameters are \(S_0\), \(a_k\), and \(b_k\) for each constituent.
Least-Squares Formulation#
Defining the modulated phase of constituent \(k\) at time \(t_j\) as:
and collecting all unknowns into a vector \(\mathbf{x} = (S_0, a_1, b_1, a_2, b_2, \ldots, a_N, b_N)^T\) of dimension \(2N + 1\), the observation equation becomes the linear system:
where the design matrix \(\mathbf{A}\) has \(M\) rows (one per observation) and \(2N + 1\) columns:
The least-squares solution minimises \(\|\boldsymbol{\varepsilon}\|^2\) and is given by the normal equations:
This is the formulation implemented in PyFES’s harmonic analysis routines. The mean sea level \(S_0\) is estimated together with the constituents, so that it does not bias them, but only the constituents are returned.
Complex Amplitude Representation#
The harmonic constants are conventionally expressed as an amplitude \(H_k\) and phase lag \(G_k\):
PyFES stores these as complex numbers:
This complex representation is used throughout the tidal model data
structures (e.g., CartesianComplex128, LGP1Complex128).
The Rayleigh Criterion#
Two constituents of angular speeds \(\omega_1\) and \(\omega_2\) can be independently resolved from a record of duration \(T\) only if:
where \(f_i = \omega_i / 2\pi\) are the cyclic frequencies. This is the Rayleigh criterion.
In practice, a Rayleigh factor \(C_R \geq 1\) (typically \(C_R = 1\)) is used, requiring \(T > C_R / |f_1 - f_2|\). As the record length increases, more constituent pairs become separable. For example:
A 15-day record separates the species (diurnal from semidiurnal) and only just resolves \(M_2\) from \(S_2\), which requires \(1 / |f_{S_2} - f_{M_2}| \approx 14.77\) days.
A 30-day record separates most constituents within a species except closely spaced pairs like \(K_1\) and \(P_1\).
A year-long record resolves the vast majority of significant constituents.
The select_waves_for_analysis() method on
WaveTableInterface automatically applies this criterion
to select the constituents resolvable for a given record duration.
Role of Nodal Corrections in Analysis#
The nodal corrections \(f_k\) and \(u_k\) appear explicitly in the design matrix \(\mathbf{A}\). If they are omitted or computed with insufficient accuracy, the recovered amplitudes and phases will be biased. For records shorter than a year, the nodal corrections are essentially constant and can be evaluated at the midpoint of the record. For multi-year records, time-varying corrections should be applied at each observation time.
References#
Simon, B. (2013). Marées Océaniques et Côtières (943-MOC), Ch. VI, pp. 126–158.
Schureman, P. (1940). Manual of Harmonic Analysis and Prediction of Tides, SP 98, pp. 49–100.