SHALLOW_WATER_2D is a MATLAB program which simulates a system governed by the shallow water equations, by Cleve Moler.
The original version of this program can be found at http://www.mathworks.com/moler/exm/exm/waterwave.m
SHALLOW_WATER_2D is available in a MATLAB version.
SHALLOW_WATER_1D a MATLAB program which solves the 1D shallow water equations.
You can go up one level to the MATLAB source codes.