Data-adaptive harmonic analysis of oceanic waves and turbulent flows