sodb documentation

The sodb function plots Southern Ocean Database data on maps or polar stereographic cartesian coordinates. Station locations are plotted as markers and gridded data are plotted as pcolor or contours.



[h,C] = sodb(...)


sodb('stations') plots locations of over 93,000 SODB-contributing station locations.

sodb('stations',MarkerSpec) specifies marker properties by name-value pairs.

sodb(gridvar,zval) plots the gridded variable gridvar, which can be 'ptm', 'oxy', 'gam', 'sal'. zval is a depth value in meters and must be one of the following:

   'max', 'min', 10,25,50,75,100,125,150,175,200,250,300,350,400,450,500,550,600,700,

sodb(...,'contour') plots gridvar as a contour plot instead of the default pcolor.

sodb(...,'contour',ContourSpec) specifies any contour preferences (e.g., levels, colors, etc.)

sodb(...,'xy') plots in polar stereographic cartesian coordinates. If you do not have the Mapping Toolbox, the 'xy' option is selected automatically.

sodb(...,'xy','km') plots in polar stereographic cartesian kilometers instead of the default meters.

[h,C] = sodb(...) returns a handle h of plotted object. If plot is a contour plot, contour matrix C may also be returned. The contour matrix is helpful for labeling contours with clabel(C,h).

Example 1: Station locations

To plot station locations, just type

sodb 'stations'

Example 2: Formatted station locations

Station locations may be formatted with any of the MarkerSpec properties you might use with plot. Let's zoom a map to the Amundsen Sea region with mapzoom, plot the continent and ice shelves as patch objects with bedmap2, and then show SODB station locations as large red pentagrams. Here I'm using rgb to get the RGB values of ocean blue:

mapzoom('amundsen sea',1000,'inset','ne')
bedmap2 'patchshelves'
bedmap2('patchgl','oceancolor',rgb('ocean blue'))

Example 3: Stations in cartesian coordinates

If you have some other data in polar stereographic (71) coordinates and you want to plot SODB station locations alongside that data, include the 'xy' tag to plot in polar stereographic eastings and northings. If you do not have Matlab's Mapping toolbox, the 'xy' option is selected automatically:

xlabel 'eastings (m)'
ylabel 'northings (m)'

Example 4: Formatted stations in cartesian coordinates

As with geo coordinates, formatting station locations is easy. Here we'll use 'kx' to specify black x markers and 'km' to plot in polar stereographic kilometers:

xlabel 'eastings (km)'
ylabel 'northings (km)'

Example 5: Gridded fields

Let's plot maximum temperature around the Antarctic Peninsula. I'm specifying Jan Brewer's Reds colormap with Stephen Cobeldick's excellent brewermap function:

mapzoom('antarctic peninsula',2000)
bedmap2 patchshelves
bedmap2 patchgl
caxis([-2 4])
cb = colorbar;
ylabel(cb,'max potential temperature {\circ}C')

Example 6: Surface salinity contours

Plot near-surface (10 m depth) salinity as a contour plot:

cb = colorbar;
ylabel(cb,'10 m salinity')

Example 7: Formatted contour lines

Plot near-surface temperature as black contour lines every 5 degrees C in polar stereographic kilometers:

[h,C] = sodb('ptm',10,'contour','xy','km',0:5:30,'black');
clabel(C,h,'color','b') % blue contour labels
axis tight

Citing these datasets

If you use SODB data, please cite: Orsi, A. H., T. Whitworth III, Hydrographic Atlas of the World Ocean Circulation Experiment (WOCE). Volume 1: Southern Ocean (eds. M. Sparrow, P. Chapman, and J. Gould), International WOCE Project Office, Southampton, U.K. More info on SODB here:

Author Info:

This function was written by Chad A. Greene of the Institute for Geophysics at the University of Texas in Austin and David E. Gwyther of the Institute for Marine and Antarctic Studies, University of Tasmania in July 2015. If you have any questions, feel free to contact Chad. You can probably find him through is website here: