We consider the shallow water equations in the supercritical and subcritical cases in one space variable, posed in a finite spatial interval with characteristic boundary conditions at the endpoints, which, as is well known, are transparent, i.e. allow outgoing waves to exit without generating spurious reflected waves. Assuming that the resulting initial-boundary-value problems have smooth solutions, we approximate them in space using standard Galerkin-finite element methods and prove L 2 error estimates for the semidiscrete problems on quasiuniform meshes. We discretize the problems in the temporal variable using an explicit, fourth-order accurate Runge-Kutta scheme and check, by means of numerical experiment, that the resulting fully discrete schemes have excellent absorption properties.2010 Mathematics Subject Classification. 65M60,35L60.