A Taylor--Galerkin method for simulating nonlinear dispersive water waves