In this paper we describe a new approach to the harmonic analysis of the tide. For a number of reasons the harmonic constants are not really constant but vary slowly in time. Therefore, we introduce a narrow-band noise process to model the time-varying behaviour of these harmonic parameters. Furthermore, since the measurements available are not perfect, we also introduce a, possibly time-varying, measurement noise process to model the errors associated with the measurement process. By employing a Kalman filter to estimate the harmonic parameters recursively, the estimates can be adapted contineously to chaning conditions. The adaptive harmonic analysis can be used for the on-line prediction of the astronomical tide or, since the Kalman filter also produces the covariance of the estimation error, to gain quantitative insight into the resolution of tidal constituents