Variational Methods in Geosciences