Heat budget of the thermosphere and temperature variations during the recovery phase of a geomagnetic storm