Thermospheric and ionospheric dynamics in the auroral region