The propagation of gravity waves from deep to shallow water