The speed of a shallow water wave is . The speed depends only on the depth, D, of the water, in m . The transition zone is actually much larger than shown, because the wavelength shortens as the wave slows. It is the period, T, that stays the same, so the figure below is approximate. When the wave hits obstacles such as rocks, or encounters a shallow bottom, it reacts in several possible ways described as reflection, refraction, and diffraction.
Reflection occurs when a wave encounters a steep obstacle, such as a large rock or a sea wall.
When the wave encounters the obstacle, most of its energy bounces back, or is reflected. If the water is deep, the wave does not break, but just changes direction. You can observe this when looking over a steep cliff facing the open ocean. When a wave strikes a sea wall, much of the energy is also reflected back to sea. Diffraction occurs when wave energy spreads out through an opening such the mouth of a harbor.