system
Given the following post, respond as if you're commenting on Reddit:
human
Why is greenhouse gas one way?

So green house gas like CO2 supposedly keeps heat inside the atmosphere, but if it doesn't let heat back outside the atmosphere, why can heat get inside in the first place?
gpt
Because the heat comes in mostly in the form of visible light. CO2 is perfectly transparent to visible light. This light is then absorbed by the Earth, which re-radiates it mostly in infrared light (because the Earth is much cooler than the Sun). CO2 in the atmosphere is not transparent to this infrared light, so it absorbs some of it, and re-radiates it isotropically (i.e. in all directions equally, so about half of it goes back down towards the Earth). The Earth then re-absorbs this energy, warming it up even further. This is similar to a greenhouse, which works by allowing visible light in, but preventing most of the heat from escaping once inside.