Magnetospheric forcing of upper atmosphere dynamics