Tidal computations in rivers and coastal waters