OpenTideConstants · field guide

Tide Mechanics

How a few numbers per station turn into a tide prediction, and which of those numbers OTC owns.

  1. 1 Sum of waves
  2. 2 Constituents
  3. 3 The formula
  4. 4 Phase and time base
  5. 5 Analysis
  6. 6 Record length
  7. 7 What it applies to
  8. 8 OTC pipeline

1A tide is a sum of waves

Each constituent is a pure cosine with its own period and size. Add them and you get the tide. Turn them on and off below. The amplitudes start at Boston-like values. These six are the largest at a port like Boston, out of a much bigger set: section 2 lists all 37 that NOAA publishes.

Three days. Each lane is one constituent on a shared scale; the bottom lane is their sum. Raise K1 and O1 to about 0.5 m and successive high waters become unequal: that is diurnal inequality.

Thirty days of the same sum. M2 (12.42 h) and S2 (12.00 h) drift in and out of step every 14.77 days. In step they add: spring tides. Out of step they cancel: neap tides. The dashed line is the M2+S2 envelope. N2 adds a monthly swing on top.

2What a constituent is

A constituent is one astronomical rhythm. Its speed in degrees per hour comes from the motions of the Moon and Sun, so it is the same at every port. The Doodson number encodes that speed as a sum of six basic astronomical frequencies.

The tidal spectrum at a Boston-like port, all 37 constituents NOAA publishes. Constituents cluster into species: diurnal near 15°/h (once a day), semidiurnal near 30°/h (twice a day), and shallow-water overtides at 3, 4, 6 and 8 times a day. The ticks under the axis mark every constituent; the number over each band counts them. The lower panels zoom into the two crowded clusters. Most lines are only millimetres tall: here M2, S2, N2, K2, K1, O1, P1 and Q1 carry most of the tide's variance. The nine constituents of the table below keep their illustrative amplitudes; the other 28 use NOAA's published amplitudes for Boston (station 8443970).

NameSpeed °/hPeriod hDoodsonWhat it tracks
The full set: all 37 constituents NOAA publishes
NameSpeed °/hPeriodDoodsonSpeciesWhat it tracks

Sorted by speed. fig marks the six in the figures. Each speed is computed from the Doodson arguments, the whole-number multiples of six astronomical rates: τ the lunar day, s the Moon, h the Sun, p the lunar perigee, N′ the lunar node and p1 the solar perigee. The computed speeds agree with NOAA's published values to the precision NOAA gives them. The Doodson number writes the six multiples as digits, adding 5 to all but the first so that none is negative: M2 is 2τ, so 255.555; Z0 is 055.555. S6 needs a multiple of +6, which has no single digit, so its multiples are shown instead. Sa is 056.555 here, as its NOAA speed implies; Doodson's own list gives 056.554, which adds the slow solar-perigee term. NOAA spells ρ1, μ2, ν2 and λ2 as RHO, MU2, NU2 and LAM2.

How many constituents?

There is no fixed number. Each source publishes the set its own analysis resolved:

  • NOAA CO-OPS: the same 37 at every station, even where some round to zero (Boston's Mm, MSf and Mf are 0.000 m).
  • JMA: 60 at the 70 stations JMA runs; only M2, S2, K1 and O1 at the other stations of its tide tables.
  • Kartverket and LINZ: a list per station. Kartverket gives Bergen 55, Stavanger 52 and Trondheim 57; seven LINZ ports we checked have 16 to 30.
  • OTC's own fit of GESLA records tries up to 45: NOAA's 37 plus 8 more. Record length sets how many fit (section 6).
  • The prediction engine's constituent table names 176, so it can evaluate whatever a source publishes.

In practice a few carry most of the tide: M2, S2, N2, K2, K1, O1, P1 and Q1. The shallow-water overtides (M4, MS4, M6 and the rest) are small at the open coast but grow in estuaries and shallow harbours, where they make the tide rise and fall at different rates.

Per constituent, a station supplies only two numbers: amplitude H (how big) and phase lag g (how late). The speed is never station data.

3The prediction formula

Every tide predictor evaluates this sum. Σ runs over every constituent a station publishes: 37 for a NOAA station, up to 60 for JMA. The six in the figures carry most of the tide. Select a term to see it on the wave.

h(t) = + Σ · ·cos(t + + − )
OTC publishesSDK computesfixed by astronomy
  • Z0 Mean water level above the chart datum. One number per station. OTC
  • H Amplitude: half the crest-to-trough height of this constituent. OTC
  • g Phase lag: how many degrees the local crest trails the Moon or Sun's pull. OTC
  • ω Speed in °/h. Identical worldwide. astronomy
  • V0 Where the astronomical driver sits at t = 0. Depends only on the date. SDK
  • f and u Nodal corrections for amplitude and phase over the 18.6-year lunar node cycle. SDK
  • t Hours since the time origin, in UTC. Σ adds every constituent. input

One M2 wave. The dashed curve is the equilibrium tide, the astronomical driver set by V0 + u. The real crest arrives g degrees later; for M2 every 28.98° of lag is one hour.

The nodal factor f across one lunar node cycle, centred on today. M2 moves about ±3.7%. K1 moves about ±11.5%, and the two run in opposite directions. The SDK computes f and u from the date, so OTC never stores them.

4Phase lag g and the time-base trap

g is measured against a clock. Move the clock by Δt and every phase moves by its own speed times Δt. One hour is 28.98° for M2 and 15.04° for K1. A wrong time zone therefore leaves a fingerprint: phase errors that scale with each constituent's speed.

+1.00 h
0.0°
Cases OTC hit:

Clock offset. Ink needle: true Greenwich g. Magenta needle: what a fit reports if the record's clock runs Δt ahead of UTC. The shift is ω·Δt, mod 360. At 12 h, S2 lands exactly where it started while M2 is off by 12°, so S2 alone cannot catch this error.

Local meridian. Some agencies publish κ, the lag relative to the station's own meridian. Converting to Greenwich uses g = κ − p·λ, where p is the species: 0 long-period, 1 diurnal, 2 semidiurnal (λ east-positive). Here M2 and S2 shift by the same 2λ. A clock error shifts them by different amounts, and that difference tells the two traps apart.

NameTrue gω·ΔtReported gp·λκ (local)

5Harmonic analysis: getting H and g from a record

Analysis runs the formula backwards. Given hourly water levels, a least-squares fit finds the Z0, H and g that best explain them. Below is a synthetic record built from known constants plus noise; the fit tries to recover them. Real analyses fit dozens of constituents, not the handful in this toy: OTC's fit tries up to 45.

30 d
0.10 m

Grey dots: observed hourly values. Magenta line: the fitted sum. The lower strip shows the residual, observed minus fit. The fit includes only constituents the record length can separate (section 6). Below about 15 days, S2 is left out and its energy leaks into M2.

NameTrue H mFit H mTrue g°Fit g°Status

This toy omits nodal corrections, so its true values stand for f·H and g − (V0 + u). A real fit applies f and u for each observation time.

6Record length decides what you can separate

Two constituents with close speeds look like one wave until they drift a full cycle apart. The Rayleigh criterion sets the minimum record: T ≥ 360° / |ω1 − ω2|. The figures below compute T from the speeds.

Record length is what limits how many constituents a fit can hold. Applied to OTC's 45 candidates, the rule keeps 29 for a 30-day record, 43 for one year and all 45 for 19 years. A noise test can then drop more.

Jump to:
Pair|Δω| °/hNeedsStatus
OTC's fit counts the hours a record actually holds, not its calendar span, and a short record simply gets fewer constituents. That is why short GESLA records are worth keeping: 30 days of Boston gave M2 within 1.6 cm and 0.24° of the 19-year fit.

7What it applies to

Tide heights at a station

Z0 plus H and g per constituent give h(t) at that gauge, for any date.

Subordinate stations

A NOAA "S" station has no constants of its own. It borrows a reference station's prediction and applies time offsets in minutes and height ratios or additive offsets. NOAA gives separate offsets for high and low water; this sketch uses one of each.

Tidal currents

40°

Currents are vectors, so each depth bin gets a major axis, a minor axis and an azimuth per constituent. The tip of the current traces an ellipse. Flood and ebb run along the major axis; slack falls where the speed is lowest. A mean current shifts the whole ellipse.

What harmonics cannot predict

Weather surge, river flow and seiches do not repeat with astronomy, so they stay in the residual. Where the tide is tiny, as in lakes and upper rivers, that residual dominates and OTC sets the microtidal flag.

8From source to SDK

The OTC pipeline, top to bottom. Every record survives to the end; the audit adds labels and never deletes.

  1. in

    Sources

    Water-level records and official constants from 16 sources, GESLA among them.

    GESLANOAAKartverketLINZ+ 12 more
  2. Δt

    Per-record time-base audit

    Checks each record's clock and meridian convention against section 4's fingerprints, then annotates it. No record is dropped.

    verifiedcorrectedunverifieddisputed
  3. fit

    Harmonic fit

    Least squares over the hours present. Record length decides how many constituents enter (section 6).

  4. ✓

    Canary check

    Compares fitted H and g with official constants at overlapping stations to catch systematic errors.

  5. db

    Combined dataset

    Z0, and H and g per constituent, per station, with the audit labels attached.

  6. h(t)

    SDKs

    Python, Ruby, TypeScript and C read the dataset, compute V0, f and u for the requested time, and sum the formula.

    PythonRubyTypeScriptC

Speeds from the standard Doodson/Schureman tables. Nodal factors use Schureman's approximations with the lunar node longitude N from the date. Station values are illustrative, Boston-like, and are not OTC data.