On the relationship of Joule heating and nitric oxide radiative cooling in the thermosphere