Solution (Matlab
code) for problem 3 which asks you to numerically solve the
transient 'Gill' problem. (This version was written
by Wenchang Yang, one of the students in the class. It
comes with a nice GUI, and uses an implicit time-stepping algorithm to
solve
the forced shallow water equations at the equator.) If you
want a more generic (and significantly faster) fortran implementation, email me.

Matlab and fortran code

Generic wave equation solver (only requires the dispersion
relation): waves_2modes.m

This is a fairly complete implementation of the linear shallow water
equations on the beta-plane for a fluid of
variable depth. The numerics, while by no means state-of-the-art, are
adequate and the code is modular and easy to follow. You can use the
code to study everything from geostrophic adjustment to tides. (But
watch out for the bit that switches evaluation of the Coriolis term at
even and odd time steps. This avoids setting up a nasty computational
mode.)

To compile: type "make" (on Linux, this expects pgf77 or pgf90 to be in
your path. On OS X, the makefile will work for absoft f77.)

To run: ./swe2d

See the m-files for examples of how to generate initial conditions and
a bathymetry file, and how to view the output. Otherwise, feel free to
ask me.

Contact Information:

Samar Khatiwala
Oceanography 204
Lamont Doherty Earth Observatory
Columbia University
Palisades, NY 10964