Reconstructing wave profiles from inundation data