As a warmup I thought we could have a look at the following paradoxical behaviour of two reservoirs of ideal gas put in a gravity field and allowed to exchange both energy and matter:
The yellow numbers indicate the kinetic energy of the molecules and the "temperature" standing to the right is simply the ensemble average of the kinetic energy. Now imagine that one of the molecules in the upper reservoir jumps down:
Taking into account that the molecule gains some kinetic energy during the fall we arrive at:
Look what happened! Energy went from lower temperature to higher temperature, thereby equating the temperature of both reservoirs. Pretty queer, huh. But if something is screwing things up here it is certainly not greenhouse gases. In a way this illustrates an important difference between the photon gas and the ideal gas concerning the relationship between internal energy and temperature:
As we can see, for the photon gas the internal energy density is simply a constant times the temperature to the power of four, period. For the ideal gas the situation is different:
Notice the "n", which is the particle density. Hence, in contrast to the photon gas, the ideal gas can have an arbitrarily nonuniform distribution of energy but at the same time be isothermal. Of course this is of no concern for climate science since in their world the atmosphere is a photon gas and an ideal gas at the same time. That is also pretty queer.