using GMT
D = maregrams(code="fer1", days=30, starttime="2025-04-01T00:00:00");
viz(D, figsize=(14, 6))
Get a one month maregram from a station in Galicia.

Resample the data to a constant time step of 60 seconds.
Set the parameters for this time series.
Find the fundamental periods (tide components) in this tide record.

The two frequencies can be found with:
Note that we got four but the last two are repeated as the FFT signal is symetric with respect to the N/2 position.
We can optain the periods in hours with
Which are the Principal Lunar (M2) and Principal Solar (S2) components.