Joule Heating of the Upper Atmosphere