Geochemical controls on nutrient dynamics