TIDE THEORY

The tides are caused by the gravitational effects of the circling of the moon and the earth around the sun.
In that complicated dance the earth and the moon in their orbits round the sun, overtake each other every month - "moonth" so that the moon effectively goes round the earth in that time. See this graphic from this website.
Each attracts the nearest part of earth (and thus attracts away from the furthest part of earth where a lower gravitational force is felt) thus causing two bulges. The second distant bulge is caused by the lower gravity at that point.
As the earth revolves therefore these two bulges also revolve.
Notice that there is no mention yet of water! Tides happen to the solid earth and indeed I suppose to the liquid mantle beneath. However water is much more able to respond and it is in water therefore that we see the effect.
So the moon (if it were in a perfectly circular orbit around the equator) would produce a perfect cosine wave repeating more or less twice a day).
The sun also (if the earth were in a perfectly circular orbit around it) would also produce a perfect cosine wave repeating exactly twice a day).
Actually we know that these are not locked together so that there is a continual phase change between them. They reinforce and then oppose each other at weekly intervals thus causing Spring and Neap tides (Spring tides with higher high waters and lower low waters, and Neap tides with lower high waters and higher low waters).
However this simple picture is complicated by land and shallow seas.
In most places the tide is not the simple astronomic tide but is driven by tides coming from other places.
Our Thames tides originate in the great Pacific tides which turn up the coast of Africa and split at Land's End, part going easterly up the Channel, and the rest going up the West coast of Ireland and round the north of Scotland (tides in the Northern hemisphere always tend to the right!) coming down the North Sea just in time more or less to meet the previous tide which then reaches Dover. So our tides are second hand - which is why our Spring tides are about two and a half days after the full and new moon.
There are further complications. Each body of water will have resonant frequencies across and along it which will tend to amplify or cancel tidal movements. And tides also travel at a speed fixed by the depth of water. And just like the much higher frequency waves we see on a beach, as they enter shallower water the underneath of the wave is slowed by friction with the bottom and the leading edge of the wave steepens distorting the wave. This also causes harmonics of the tidal frequencies.

In that description is the clue to how to calculate tides. The Moon's effect is greater than the Sun's so we start with a cosine wave of the perfect moon. We could call it M2 (Moon twice a day). Astronomers know its exact frequency - in degrees per hour it is 28.98410422°
And then the sun S2 (Sun twice a day - because of those two bulges). If you think about it you could work that in your head. The sun "goes round" every 24 hours which means 15 degrees per hour, but we need double that so it is exactly 30 degrees per hour.
Those are the first two ingredients in our tidal recipe.
And we can go on to add many different cosine waves which correct for the wobbling orbits of the earth and moon. There are a large number of them - some six hundred have been found. Fortunately many of them have very tiny or slow effects on the actual tide. And the good thing is these are constant for every place on earth.
So that describes the ingredients, but each place has them in unique proportions.
At Southend for example the M2 constituent has a maximum amplitude of 2.06944 metres.
And the S2 constituent has a maximum amplitude of 0.5925 metres.
And each of the other constituents has an amplitude unique to Southend.
So the moon's effect is more than 3 times the sun's and the result is that simply by knowing the state of the moon it is possible to make rough estimates of the tide.
If you look at the blue moon lines in the graphs below you can see that the tide times are not far out.
But how in the calculation do we include the current state of the moon and the sun (and all the other smaller cosine waves that have to be added)? Fortunately they go like clockwork! All we need for each unique place, is to know their state at a fixed day in the past (the epoch) and then knowing their frequency we can find the situation now.
And that's all there is to it. At each time add up where all those cosine waves have got to and the result will be more or less what the tide would be ( if only the wind and surges coming from elsewhere caused by the wind and pressure changes would let it! ).
So we need three figures for each of a hundred and more constituents. And two of those figures are unique for every place - and not easily available - and of course they do go out of date as channel depths vary and currents change - and in a large calculation like this it would be easy to make the odd mistake - and some people's lives may depend on getting the figures right - so that's why its better to use tidetables rather than calculate your own.


Southend Spring Tides: Red - the total calculated tide;
Blue - M2 moon; Green - S2 Sun; Black all the other constituents added
Notice that at Springs the blue moon and the green sun waves are more or less in phase reinforcing each other.
A week later at Neaps the opposite is the case and they tend to cancel.


The Southend tide at the moment in my (not to be relied on!) calculation
Red: the resulting prediction (adding all the others)
Blue: M2, the moon. Green: S2 the sun.
And this time Purple: N2. & Black: all the others.

Southend Tide at the moment
Red: the resulting prediction (adding all the others)
Blue: M2, the moon. Green: S2 the sun.
Purple: N2. & Black: all the others.

SURGE

This comes with all the authority of a total amateur! It is my untutored understanding and as a result may well have gaps and errors. If you are in a position to correct me please do!

By 'surge' I mean the difference between the observed tide and the predicted tide. I think some people use the word 'Residual'. The apparent surge is what it really should be called because within that figure may be at least four major components:
ATMOSPHERIC PRESSURE;
The standard pressure is 1013.25 hPa hectoPascalls or mbar.
That may range over 1050hPa to say 930hPa. The extremes are very rare! Every hPa unit away from 1013.25 causes a one centimetre change in sea level so the range is +36.75cm to -83.25cm. That's the theory. But that water has to come from or go to somewhere else where the pressure is higher or lower. Moving water goes in waves. So in practice all we can say at one instant is that the level caused by air pressure will tend towards the calculated figure and that how it arrives at that will be a matter of time and the complex interraction of waves which will be referred to below.
The 1953 flood was caused by a cyclone around 960hPa causing a rise of 50cm in addition to what else was happening.
LOCAL WIND;
Wind moves water. The down wind end of an enclosed lake will have a slightly higher water level than the upwind end. By local for the Thames Estuary we mean the southern half of the North Sea. In the Northern hemisphere the rule for moving water is keep right! (Coriolis force). The maximum effect of a wind from the north is at right angles towards the west. So a north wind down the North Sea will pile water up against the Essex coast and rush up the Thames Estuary. That 'rush up' is significant. Moving water comes in waves. This is not a static gentle increase in level but a wave which travels at a speed determined by the depth. Like all waves it will become higher as the depth decreases. Like the tide it will be subject to all the geographic resonances that the tide itself is subjected to. So it is just one more amongst the many constituent waves that make up the tide. They reinforce and cancel in a complex dance.
AREA WIND and ATMOSPHERIC PRESSURE;
By area I mean the north eastern Atlantic, and the northern part of the North Sea. This is similar to the local wind, only, because it comes from a greater distance, it tends to come with a much longer time scale (longer wavelength - longer than the tide cycle) That I think means that for practical purposes we can think of it as a relatively steady change in sea level. There is more or less water. So a cyclone off Ireland will tend to drive water round the north of Scotland into the North Sea. It is said that a lower pressure coming down the North Sea (with consequent north winds increasing levels all down the coast) is the most likely cause of big surges.
There is also the possibility of 'a backdoor' area surge caused by a southwesterly local wind in the English Channel surging through the Dover straits and raising the southern North Sea.
ERRORS; -
And last there may be errors - and any errors will inevitably show as part of the apparent surge.
Amongst possible errors are the prediction method, the gauging method, and short term level changes unrelated to the tide.
The harmonic method of tide prediction inevitably contains errors by the very nature of the way in which it works. All efforts will have been made to reduce these errors - but some must remain. The PLA calculations should theoretically be accurate to millimeters but nobody can quite guarantee that.
The gauges are exposed to all the elements, they may have calibration errors, or software errors, and occasionally they produce erratic figures or none at all.
Seismic activity may send waves with a long enough wavelength to affect the gauge figure.

Evidence of the way the surge waves interract with the tide waves can be seen above. Look at the high water on 21 Mar just before noon. The time of the peak observed level (dotted) does not exactly coincide with the peak predicted time. There are two ways to look at that - either the negative surge suddenly disappears at the moment of the peak predicted tide - or perhaps it would be better to understand that the phase of the tide has gone back a few minutes, the tide has arrived later than predicted.
I will find an example of the reverse with a positive surge as soon as I can.
SKEW SURGE;
That idea gives rise to a different way of measuring the surge. The skew surge is the difference between the observed level at the surge phase and the predicted level at the equivalent tidal phase. At the peak level that means expressing the surge as the maximum predicted subtracted from the maximum observed. If the phase has changed then these two figures will relate to different times.
I have seen it stated that there is only one skew surge per tide cycle. That is probably because if you are concerned about maximum levels and flood prediction it is the maximum peak with which you will be concerned. However there are at least two points in the cycle when skew surge can easily be found. The maximum at high water and the mininum point at low water. At both points the 'real' value of the surge can be found and also the degree by which the predicted levels have been advanced or retarded by the interraction with the surge (in degrees or minutes).
This idea throws light on the commonly noted situation whereby positive surges tend to disappear at high water. The apparent surge disappears because the advanced phase change of the observed level now has it measured from the still rising predicted level. The positive real surge may be still there and may be there on the ebb tide whilst the apparent surge is now showing negative. The real question is how much extra water is present in the local system?