Managing water variability, from floods to droughts