The atmosphere also absorbs and emits but is NOT a blackbody
This is because of natural (water vapor, stratospheric ozone) and unnatural (CO2, tropospheric ozone, methane) gases that live in our atmosphere!
These gases absorb in some wavelengths, but not others, so, we call them selective absorbers
Ozone (O3) and Oxygen (O2) absorbs UV radiation
Carbon dioxide (CO2) absorbs longwave radiation, but not shortwave
Water vapor (H2O) absorbs longwave radiation, but not shortwave
Since all of these substances exist in our atmosphere, the total of them is the selective absorption for the atmosphere
Almost all shortwave radiation (i.e., from the sun) can get through
But longwave (i.e., from the earth) can’t escape
Outgoing (longwave) radiation from Earth:
6% is transmitted out to space
94% is absorbed by the atmosphere
Re-emitted to space or down to the surface
For the Earth, T ~ 255 K (no atmosphere), T ~ 288 K (selectively absorbing atmosphere)
So, the greenhouse effect for the present-day Earth contributes ~33 K in warming.