The relationship between ionospheric convection and magnetic activity