The effect of the solar wind on the ionosphere