Spain takes stock of flood damage