A simple linear shallow-water model forced by tidal boundary conditions can capture most of the tide height variability in Long Island Sound. In this sense, the tides are easy to model. The modeled tidal currents can be subtracted from measurements in order to obtain estimates of subtidal circulation. But linear shallow-water dynamics is not accurate enough for this purpose. Allowing for dynamical errors with a generalized inverse model leads to improved estimates of tidal and nontidal flow. The analysis provides expected errors for the prior (before inversion) and posterior (after inversion) tidal velocity field. Estimates of the flow field in central Long Island Sound are obtained with current measurements from a ship-mounted Acoustic Doppler Current Profiler (ADCP) survey. Inversion of data from a single ten-hour survey improves tidal predictions, as verified with independent data. Furthermore, the posterior penalty functional is shown to be an effective test statistic for the existence of nontidal flow. The inverse model reduces model-data misfit, using interior dynamics and open-boundary conditions as weak constraints. Model-data misfit can also be reduced by tuning the friction parameter in the prior tidal model. However, in contrast with inversion, tuning degrades predictability.