How does the rock cycle affect the atmosphere of the earth?