I'm toying with an infrared thermometer - one which you point onto an object, press the button and it instantly measures the temperature by estimating the infrared radiation from the object. It shows more or less the room temperature when I point it to things in the room.
Now I open the window. The temperature outside is 12 degrees Celsius. I point the thermometer to the ground - it shows something near 12 degrees. When I point it horizontally and directed onto a building located several hundred meters away - it shows something like 5 degrees. When I point it onto the sky it shows an error message indicating that the measurement result is below zero Celsius and it can't display it.
This doesn't make sense - the ground has the same temperature as the air and there's a thick layer of air above, so wherever I point the thermometer the temperature is more or less the same and so the infrared radiation intensity should be more or less the same. Yet the thermometer displays largely different results.
Why does the infrared thermometer display much lower temperatures when directed to the outer air compared to when directed onto nearby solid objects?