The length as well as the depth of water together determines the speed or velocity of waves. However, in case the water is shallow compared to the length of the wave, the speed at which the wave oscillates depends on the depth only.
It is proportional to the square-root I of the depth. On the contrary, when water is deep in relation to the wavelength, the velocity is determined by the length alone, and is in proportion to the square root of the length.
However, when the water in relation to the length of the wave is neither deep nor shallow, the velocity in such a condition is dependant both on the depth of water and the length of the wave.
In other words, we can say that if the depth of water is greater than half the wavelength, the velocity depends mainly on the length. If the depth of the water is less than half the length of the wave, the velocity is determined by the depth.
In the open ocean, therefore, the velocity of a wind-generated wave is dependent on its length; but on the continental shelf with shallow water it depends upon the depth of water. It is due to this reason that on a beach the wave-crests are almost parallel to the sea-shore irrespective of the wind-direction.
In the open ocean the wave-crests are at right angles to the wind. But near the coast the waves travel more slowly with the result that the wave takes a gradual turn until the wave-crest is almost parallel to the shore.