Ionosphere-thermosphere system heating and cooling during storms