Matlab and Fortran for Introduction to Physical Oceanography

Print version E-mail to a friend
Text Size: Change text to small (default) Change text to medium Change text to large

1. Seawater Toolbox

This Matlab toolbox contains most of the functions you will need to do your homeworks and team projects. You can download the toolbox from here.

2. Ocean Data View

A very powerful yet easy to use software to analyze and generate beautiful plots of oceanographic data in an interactive way. Download the software from here.


This site contains many useful matlab codes that makes our life much easier as an oceanographer.

4. Jim Price's collection

This is a collection of Fortran programs and Matlab scripts that are used by Introduction to Observational Physical Oceanography, 12.808, and in the past by Fluid Dynamics of the Atmosphere and Ocean, 12.800. They are public domain for all educational purposes.

Please let Jim Price ( know if you see errors or have an idea for improvement.

Link Description
Danalysis.m Perform a dimensional analysis. (see also the essay ND.pdf noted on the previous page)
rotation.m Show the kinematics of motion observed in a rotating coordinate system.
coriolis.m Show the kinematics of the Coriolis force; a companion to rotation.m.
fred.m Solve the fredholm problem for a particle on a slope; the simplest model of geostrophic adjustment with friction.
geoadjpe.m Solve for geostrophic adjustment of a single layer in one dimension.
bore.m Solve for adjustment under gravity only of a single layer in one dimension.
waves6.m Show the superposition of two waves.
DAsoln3.m Wave propagation and dispersion of a pulse via D'Alembert's method.
gwavemovie.m Animate the currents under a gravity wave.
upperEk.m Solve for the wind-driven currents in an upper ocean Ekman layer.
bottomEk.m Solve for the currents/winds in a bottom Ekman layer.
Couette.m 1-D diffusive flow in a channel by numerical and similarity methods.
 ts_plot.m  Plots potential density contours overlaid on a T/S plot
S61.m Integrate the Stommel 1961 thermohaline box model.
bvort.f Fortran program to integrate the homogeneous wind-driven circulation model via the 2-D vorticity equation. Much like Veronis DSR, 1966.
bvlook.m Matlab script plots wind stress profiles, and other stuff from bvort.f.
bvsprof.m Matlab script plots wind stress profiles, and other stuff from bvort.f.
bvtime.m Matlab script plots time series of energy, enstrophy and more from bvort.f.
basin.f Fortran main program for a layered, primitive equation ocean model. The standard case is that of Holland and Lin, JPO, 1975. This is a rather complex model, but very useful for studying the spinup of a wind-driven basin, and not atypical of ocean GCMs. Fortran subroutines needed to link with basin.f.
blook.m Matlab script to make plots of streamfunction, etc from basin.f
btime.m Matlab script to make time series plots of energy, vorticity, spectra and more from basin.f.
btracks.m Matlab script to plot float tracks from basin.f.
geoadj.for Fortran main program for a layered, primitive equation ocean model. This version is configured to do a geostrophic adjustment problem in two dimensions (one layer).
gatime.m Matlab script to make time series plots of data from geoadj.f.
galook.m Matlab script to make time 3-d plots of data from geoadj.f. Matlab scripts that animate some SOFAR float data.


WHOI logo

Last updated September 14, 2010
© Woods Hole Oceanographic Institution. All rights reserved