University of Galway research team reveal thousands living in western coastal areas narrowly avoided devastating flooding