An Introduction to Tidal Harmonic Analysis

You’re lying on the beach. You’re eyes are closed and the sun is warm. All is well. The oceans however, grow louder and louder, when suddenly a surge of water advances, and drenches you and all your belongings!

What may seem to be the ocean’s way at getting back at the humans who pollute its waters, is actually just the periodic ebb and flow of the ocean known as the tides.

In many aspects of oceanography, it is useful to separate data series such as temperature, velocity, pressure, etc… in terms of tidal and non-tidal components. For example, in my work for EUREKA, I am trying to evaluate changes in pressure (and relatedly sea level height) measured via a sensor placed on the ocean floor. I need to be able to discern changes in sea level height on the order of + 5 cm. This became a difficult proposition when I realized the sea level is constantly fluxuating on the order + 2 m multiple times a day!

If you are interested in the physical mechanisms that underlie the tides, I highly recommend the video below. For this post however, I will be focusing on the techniques oceanographers use to reduce tidal components of their data.

The Building Blocks:

Let’s acquaint ourselves with what a typical pressure signal looks like over a month long period. The blue line represents the pressure signal (measured in decibels) and the red line represents the average value of the signal over the month long period. The periodic nature of the graph easily implies a strong tidal component, although other periodic trends exist like wind forcing of the water due to a sea breeze, but no other periodic trends occur at the scale of tides in terms of consistency.

Graph 1

Our goal is to attempt to identify the tidal signal, and since it is periodic, it is a good idea to review our sines and cosines as they are useful in modeling periodic graphs.

Here is a simple sine function: y = sin(x) from 0 to 6 pi.

Graph 2

This graph is clearly periodic, but yet it doesn’t quite represent our pressure data. We can do better though! If we add some other periodic functions we will really start to see some resemblance between our pressure signal and the simple graph I created below.

Here y = sin(x) + cos(x) + sin(2x) + cos(2x) from 0 to 30 pi.

Graph 3

We can continue this process of adding up various sines and cosines until it resembles our pressure signal. In fact, mathematicians in the 18th and 19th century deduced that all periodic functions can be represented as the summation of sines and cosines.

Here is a link to a wonderful animation showing how even a couple sines and cosines can add up to look like a saw tooth!

Armed with the knowledge that any periodic function can be modeled as the summation of sines and cosines, we can in fact look at our pressure signal and determine what frequencies are present and the relative impact they have on the overall signal! Let’s not forget how powerful this tool is. Richard Feynman remarked, “It is easy to make a cake from a recipe; but can we write down the recipe if we are given the cake?” Joseph Fourier and his colleagues showed that we can have our cake, and determine its components too!


Breaking down the Tides, Constituent by Constituent:

If the moon orbited around the Earth in a perfect circle in the plane of the Earth’s equator and the sun were not present (A lot of assumptions!), a typical graph of a tidal signal may look like this:

Graph 4

The insight to be gained from looking at this graph is that the dynamics of our orbits with astronomical bodies influence the tides in a regular manner (i.e. at specific frequency). These specific frequencies are each given names. In the example above, it is called the M2 frequency. In the case where we now consider both the Moon and the Sun’s effects (S2) on our tides, our tidal graph may look like this:

Graph 5

Note the longer term periodic trend of the graph of about 2 weeks which corresponds with the alignment and mal-alignment of the sun and moon.

The M2, S2 and other frequencies are called constituents. They are further specified by the sum of various frequencies arising from planetary motion such as the rotation rate of the earth, the orbit of the moon around the earth and the earth around the sun, and periodicities in the location of lunar perigee, lunar orbital tilt, and the location of perihelion. (See References & Resources for additional info).

When analyzing the tidal components of our signal, anywhere from 5 – 60 constituents must be taken into account depending on the accuracy needed and the length of the raw data used. Once these tidal constituents are determined by methods of spectral analysis (See References & Resources), they are removed from the pressure signal, and a “de-tided” signal remains. This is called the harmonic method of tide analysis and was developed by Lord Kelvin and Sir George Darwin beginning in 1867. We can now evaluate the variations in pressure we care about with great precision!

The final product of de-tiding a pressure signal is shown below at Point Purisima (PUR). Note how small the variations in pressure are in the de-tided signal vs the raw pressure.

Graph 6

Graph 7


References & Resources

The Feynman Lectures on Physics: Volume 1

What Physics Teachers Get Wrong about Tides!             PBS Digital Studios

Fourier Series Wikipedia

Harmonic Analysis and Prediction of Tides Stony Brook University

Classical tidal harmonic analysis including error estimates in MATLAB using T_TIDE (Pawloicz et. Al) 

Note: I use T_TIDE to de-tide my data.


Research got you feeling confused?

There is a sentiment when entering the college world that your learning is solely up to you.

It is true to an extent, although I have really taken it to heart: no one cares more about my learning than I do. This internalization of the learning process enforces the idea that it’s your responsibility to learn. It also leads to the idea that if you don’t understand something, then you’re not really trying. This attitude only worsens during the transition to to more advanced courses and research. It is no coincidence that being surrounded by high achieving peers commonly found in the university setting leads to imposter syndrome: the persistent fear of being exposed as a “fraud”.  As you get closer to the limits of a field of knowledge, it’s harder to seek the answers to the increasingly specific and focused questions that characterize cutting edge research. As Martin Schwartz puts it, “Science involves confronting our ‘absolute stupidity’”. In research, there is no such thing as stupid questions, because no one knows the best way to confront the question until the answer is found, if it is ever found. Everyone is similarly in the dark, undergraduates think their graduate student TA’s are smarter than them. Graduate students think their advisors are smarter than them. The only difference between these groups is experience. Those who have waded through the darkness longer have simply grown accustomed to and learned to navigate the sea of ignorance they must face in order to expand their knowledge.

So let’s embrace our ignorance. Instead of growing discouraged, let’s seek inspiration in the fact that creating new knowledge is hard and that there is always something to learn, even if we get it wrong the first time. We should take our intellectual pleasures where we find them.