MATLAB Examples

sodb_profile documentation

sodb_profile plots oceanographic profiles along a given transect.

Contents

Syntax

sodb_profile(sodbvar,lati,loni)
sodb_profile(sodbvar,xi,yi)
sodb_profile(sodbvar)
sodb_profile(...,plottype)
sodb_profile(...,'contour',n) or 'contourf'
sodb_profile(...,'contour',v) or 'contourf'
sodb_profile(...,'contour',...,'label') or 'contourf'
[zi,d] = sodb_profile(...)

Description

sodb_profile(sodbvar,lati,loni) plots a vertical profile of data along the georeferenced transect given by lati,loni, where lati and loni are vectors of equal size. Options for sodbvar are:

   'ptm' potential temperature
   'sal' salinity
   'oxy' oxygen
   'gam' potential density
   'ins' in situ temperature (requires GSW toolbox)
   'abs' conservative temperature (requires GSW toolbox)
   'con' absolute salinity (requires GSW toolbox)
   'dtm' thermal driving, calculated as the temperature above in situ freezing point. (requires GSW toolbox)

sodb_profile(sodbvar,xi,yi) specifies the transect path in polar stereographic (true lat 71°S) cartesian coordinates.

sodb_profile(sodbvar) called without any arguments opens a user interface on a current map. While the interface is open, click on the map to define a profile path. Undo points by hit Backspace. When you're satisfied with a path you've drawn, hit Enter to create a profile. To quit the user interface without creating a profile, hit Esc.

sodb_profile(...,plottype) specifies a type of plot for SODB data. Default is 'pcolor', but can be 'contour' or 'contourf'.

sodb_profile(...,'contour',n) specifies a number of levels in the contour or contourf plot.

sodb_profile(...,'contour',v) specifies contour values as a vector.

sodb_profile(...,'contour',...,'label') labels contour lines.

[zi,d] = sodb_profile(...) returns interpolated SODB data zi and depth array d.

Examples

Given this example straight-line path:

x = linspace(-2028572,-1566407,300);
y = linspace(-1055055,-247133,300);

[lat,lon] = ps2ll(x,y);

mapzoom('amundsen sea',1000,'inset','nw')
bedmap2 patchshelves
bedmap2 patchgl
plotm(lat,lon,'b-','linewidth',3)

Example 1: pcolor plot in geo coordinates

Plot a potential temperature profile:

sodb_profile('ptm',lat,lon)

Example 2: contourf in polar stereographic coordinates

Plot temperature above freezing. I'm using brewermap to get that nice red color scale:

sodb_profile('dtm',x,y,'contourf',0:5)
colormap(brewermap(64,'reds'))

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: http://wocesoatlas.tamu.edu/

If you use any of the datasets which use GSW conversions, cite IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of seawater - 2010: Calculation and use of thermodynamic properties. Intergovernmental Oceanographic Commission, Manuals and Guides No. 56, UNESCO (English), 196 pp. More info on GSW & TEOS-10 here: http://www.TEOS-10.org

Author Info:

This function and supporting documentation were 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.