I hope you don't mind me posting here, Mick, instead of starting another 'still, still more foam' thread.
Not sure if I'm doing this the same way as you guys have been as I haven't looked at any of the previous clips but it seems much the same as Ulco's displacement to vector method.
The smooth step makes the width of the turbulence falloff and the hard step removes the subterranean water. In this image I used constant vector width='75', and needed to use constant vector opacity='55' to adjust how close to the terrain the water is omitted.
* The opacity width should always be somewhat less than the falloff width. At a constant width of '25', an opacity vector of '20' was needed to pull the water back to just behind the point it meets terrain. In other words, adjust the opacity constant vector to suit, if you adjust the falloff vector.
Didn't spend any time on the waves or terrain, and there's no white-caps past the smooth step distance either here. That shouldn't be too hard to add of course, I just played with the shoreline. The water is a sphere so it is planetary, adjust the water-level with some displacement offset or, remove the sphere object and just use a lake/plane, if you prefer.
** Maybe the volume density is a bit much in the water shader here?
Image 2 is just to show the water with the opacity trick, all you can see is distant atmosphere where the terrain should be.
[attachimg=1]
[attachimg=2]
[attachimg=3]