I consider a model of fluid motion closely related to the Korteweg-de Vries equation that governs shallow-water waves. Upon reformulating this model as a geodesic in an infinite-dimensional group, the fluid's drift velocity can be recast as an ergodic rotation number. The latter is sensitive to Berry phases, inspired by conformal field theory and gravity, that are produced by adiabatic deformations. Along the way, I show that the topology of coadjoint orbits of wave profiles affects drift in a dramatic manner: orbits that are not homotopic to a point yield quantized rotation numbers. These arguments rely on the general structure of Euler equations, suggesting the existence of other applications of infinite-dimensional geometry to nonlinear waves. (Based on arXiv:2002.01780 with Gregory Kozyreff.)