Other contributors have said "What causes wind on the ocean shore?" is the same question as "Why does wind change direction at night from on shore to off shore in terms of convection currents?" If you believe that these are not asking the same thing and should be answered differently, click here

Why does wind change direction at night from on shore to off shore in terms of convection currents?

Answer:

During the day the earth is heated by the sun. The earth then heats the air, and the heated air rises. As the air heated air rises, cold air from the ocean travels in to take its place, resulting in on-shore winds. At night the earth cools down, making the ocean warmer than the earth and the process is reversed, creating off-shore winds. Cold air is clumped together looking for spots to spread out. That is why when hot air rise, the cold air takes its spot, spreading out, becoming warm and repeating the process over again.
First answer by ID2034809389. Last edit by Pinkiepie096. Contributor trust: 2 [recommend contributor recommended]. Question popularity: 2 [recommend question].