Tidal dynamics of the water table in beaches