Sometimes, when I have a little Heimweh, I take down Wordsworth's Ode, his Intimations, and find it suits my mood exactly:
Hence in a season of calm weather
Though inland far we be,
Our souls have sight of that immortal sea
Which brought us hither,
Can in a moment travel thither,
And see the children sport upon the shore
And hear the mighty waters rolling ever more.
Here in the centre of Germany, I am just about as distant from the sea as it is possible to be in western Europe - and yes, I must admit, I miss it.
Unlike the land, which alters its appearance in the rhythmic cycle of the annual seasons, the sea is ever changing, from day to day, and even hour to hour. To some extent the colour of the ocean is determined by the sky. The water reflects the changing patterns of blue and white and grey above, and this alone is sufficient to impart a wide variety of colour to it: part of the blue of the sea is a reflection of the sky.
But there are other reasons for the preponderance of blue. Sea water, like fresh water from a tap, is almost transparent - but not entirely so: it slowly absorbs any light that passes through it. It so happens that water absorbs the longer wavelengths of red and orange light more efficiently than the short blue wavelengths, and in fact if you were to position yourself some distance underwater, the light penetrating from above would have a bluish tinge regardless of the colour of the sky, because much of the red and orange light that formed part of the original mixture had been filtered out.
Normally, of course, we tend to observe sea water from above - and from this vantage point we see another optical process at work. As light passes downwards through the water, the tiny molecules of liquid obstruct the light waves and "scatter" them in all directions. So the white sunlight entering the sea is first filtered until it is blue, and then some of this blue light is scattered back in the direction of an observer watching from above.
Reflection, absorption and scattering all combine to give the sea its colour. Many factors - like the depth of the water, the roughness of the surface, any impurities that may be present and the angle from which the scene is viewed - affect the relative efficiency of each of these processes at any given time. The result is the infinite variety of greens, blues and greys which make the ocean so attractive.