Controls of the Chemical Composition of Geothermal Waters