Whenever air flows over the surface of the Earth, drag reduces the speed of the surface wind to less than that of the geostrophic wind at an altitude of a few hundred metres.
At sea, this produces a surface wind which is angled about 10-20° anticlockwise from the geostrophic wind. Over land, the effect is more pronounced, and the surface wind is angled about 20-40° anticlockwise from the geostrophic wind. This means the wind direction over the sea differs by about 20-30° from that over the land.
Where the wind is blowing generally offshore, it makes this ‘alteration of course’ gradually, in a zone extending up to about 5 miles offshore.
Where the wind is generally onshore, a similar effect occurs a few miles inland.
Convergence and divergence
When the wind is blowing along the coast, the difference in wind directions over land and sea has a different effect.
If the land is to your right when you are standing with your back to the wind (i.e. if the low pressure is to seaward of the coast) the winds over the alnd and sea will be converging with each other, creating a funnelling effect: the wind along the coast will be stronger than offshore.
If the land is to your left when you are standing with your back to the wind (i.e. if the low pressure is to landward of the coast) the winds over the land and sea will be diverging from each other so the coastal wind will be lighter than offshore.