Chemistry in the earth system