What is the atmosphere's role in the exchange of gases on Earth?