SBPLOT: oceanographic data presentation  navigation
Datafiles Data manipulation Plotstyle

SBPLOT: Oceanographic data presentation

This is a small matlab toolbox to make different graphical representations of oceanographic data using a graphical user interface. The data is supposed to be in Seabird CNV format (ascii or binary) or in netcdf Format (essentially one profile per netcdf file). It should be easy to include other formats.

Sbplot has been developped for Matlab 6 on Linux operating systems, but do also work on Matlab 6 for Windows. It definitely does not work under Matlab 4. For using sbplot it is required to include the CSIRO Seawater Toolbox in the matlab search path as well as the sbplot directory itselves. Working with netcdf files the netcdf toolbox is necessary.

Calling sbplot, a GUI opens (show picture). This GUI is divided into three parts:

It is recommended to follow these steps one after the other. Finally pressing the button [ok], the GUI closes and the data is read in and drawn.



Datafiles

To select the datafiles, there are two possibilities. The selection between both is done with switchbuttons [path] / [filelist] in the upper right corner. Although it is possible to switch back and forth between both options, only the option that is active when leaving the the GUI with [ok] is used for the actual data input.

PATH [path]
This option is intended for single cruise data, which is stored within one directory, with filenames that just differ by the profile/ station number (e.g. CTD001.cnv, CTD002.cnv,...). The following mask has to be filled out:

LIST [filelist]
Within this option individual file names can be given manually, respective [browser] browsed for. The input is a text mask which can be edited and shows the choosen filenames:
[filelist]
It is also possible to include several files, using a comma separated format as given below:

Another detail the user should notice is, following the interaktive selection by [browse], the option filelist is allways active. A change to option [path] now, causes sbplot to take the path and the filename of the interactive selection (usually the last line of the list) as settings for the input mask of option path. If the structure of the filename is not a simple common one, the settings must be corrected manually.



Data manipulations

Some basic data processing can be choosen here. These are exluding the up-profile or data near the surface and average to regular pressure steps.
data manupulation window
In the box of Werte entfernen mit Druck kleiner als (db) one can choose to exclude values with pressure less then the given value. This is useful, if the values on deck or when the pump was still not working have not been removed yet.
Checking Hievteile entfernen it can be determined to leave out upcast data.
If the value at Mitteln auf db is larger then zero, values are averaged onto fixed pressure steps each given db. This is necessary for cross-sectional pictures. The value of Druckfenster beim mitteln determines the size of pressure window used in the averaging. A value 5 for the pressure step and 10 for window size means, average values are calculated for every 5 dbar. Further, the calculation of the average for the depth of 25 dbar is based on values between 15 and 35 dbar. In this case, the graph is smoothend strongly.
If no input happened, the plot will be made by default settings.

Plotstyle

In sbplot, different styles for plots are provided. A detailed description for the options cross-sectional plots, "Gitter" , XY-Plots and XYZ-Plots is given here.

Cross-sectional plots/"Gitter"

After choosing "Schnitt" or "Gitter" for plotsyle, it is necessary to select a variable to display. Further, you can select between colored drawings with isolines (show picture), just colored without isolines (show picture) or black&white drawings(show picture). If necessary, it is also possible to modify the presentation afterwards.
The variable for the y-axis of a cross-sectional plot is allways pressure. The pressure values must be the same on all input files (best is to average them into equally spaced values, see data manupilations. For the x-axis you can choose between cumulative distances between stations, geographic latitude, geographic longitude and a time axis.
A Gitter is considerably the same than a cross-section, except the difference, the y-axis may vary from pessure. So, another variable for the y-axis can be selected. In this case, reference values must be given in the matlab command window (for example, input of [27:.02:28] will be good values for sigma-theta).

When all settings are done, the window will be closed by [ok]. After the data have been read, a new window opens, displaying the geographic position and waterdepth of each station (show picture). If necessary, the values can be corrected now. Otherwise, the window is closed by [ok]. If after having done some corrections, these are not readable (for example letters or a comma instead of a decimal point) the mask will be shown again with the unreadable fields marked in red. These fields must then be corrected.
After this step, two another windows opens. On the right handed side a preview of the plot, on the left handed side a GUI (show picture) to modify isolines and colors. Now, different settings for colors, lines and ranges may be tested. Selecting colors manually, it is important to know, that white color means transparency. This is made, to allow to plot a isoline, without changing the background color. By pressing [Apply], the plot is redrawn in regard to the current settings. If the user is content with the presentation, the menue isolines might be closed by [Exit]. Now, in the remaining window (showing the plot), the positions of the inscriptions of the isolines have to be given by a mouse-klick. This work is finished by a mouse-klick in the gray shaded area around the plot or a [Enter] in the matlab command window. Afterwards, in case of a cross-section plot, the bottom contour will be drawn, before, in any case, a colorbar is added and the plot is finished.
If the presentation is not representing your expectations, it might be caused by several frequently mistakes or you have to modify the presentation afterwards (adding labels etc.).

XY-Plots

XY-Plots often are simple profiles (pressure on y-axis) (show picture), diagrams of potential temperature versus salinity (show picture) or simmilar drawings. In this case, you can chose a variable for the x-axis as well as for the y-axis. In both cases, the GUI to select a variable opens.
After closing the sbplot-GUI, another window opens (show picture) to select style, size and color of markers, representing the stations. Pressing [OK] the date were read and displayed.
As said for cross-section plots, it is possible, that the plot is not representing your expectations. This might be caused by several frequently mistakes or you have to modify the presentation afterwards (adding labels etc.).

XYZ-Plots

XYZ-Plots are three-dimensional illustrations of several parameters. It is less used to display the three-dimensional distribution in space of one parameter then to analyze dependencies of two parameters in regard to a third one. Those ilustrations are very special. Therefore, a further description will not be given.

select a variable [back to cross-sections] [back to XY-Plots]

After pushing the button with the variablename of the current setting, a window opens (show picture) with several parameters to select. If the desired parameter does not exist in the datafiles (for example oxygen) or a parameter which may not be calculated by the measured ones (for example AOU=apparent oxygen utilisation, when oxygen has not been measured), the datafiles will be read but no data will be displayed.
Selecting [INTERNE], a new window opens (show picture) displaying those parameters, which are provided by the current datafile. The variable to be displayed can be selected out of that list.
Most variablennames are self-explanatory. Concerning density, values for sigma-theta, sigma-1, sigma-2, etc. may be selected, corresponding to the potential density-1000, at 0,1000,2000,... dbar . AOU is the Apparent Oxygen Utilization, N**2 the Brunt-Väisälä frequenzy, P-Pmax the difference in pressure in regard to the maximum pressure (for a better presentation of the bottom layer from the denmarkoverflow).
Reading the datafiles, it may occur, that even standard parameters (pressure, salinity, etc.) may not be found. Then, a window opens (show picture) and the name for this standard parameter in the current datafile is asked for. If any variablename is fitting the standard parameter is listed, button [does not exist] has to be selected. The results to that procedure were stored in a global variable and thus available for the folowing datafiles.

Modify isolines and colors [back]

In this mask (show picture), settings concerning isolines, schading colors etc. may be done. For colored illustrations (show picture) the color of the inscriptions to the isolines can be set. After pressing [Iso textcolor] the matlab-tool for selection of colors (show picture) opens. The text of the button [Iso Beschriftungsfarbe] is representing the current setting. The background color of the button is unimportant. In field isolines detailed information about isolines may be given in matlab notation (for example [0:3:30],but not more than 40 values). Pressing [ENTER], these values are found in the upper part of this window. On the right handed side, different colormaps may be selected. The choice is applied to the isolines immediately (show picture). The properties of the isolines (value, shading and linestyle) may also be modified manually (show picture). The result of the input given in the example is shown here. Each time when pushing [Apply], the current settings were applied to the plot and the preview is refreshed up. The menue for modifying iolines and colors is finished by pressing [Exit]. The current preview became valid for the presentation.
For black&white-plots (show picture), the isolines may be defined in the same way as described for colored figures. It is possible to declare all isolines in matlab notation as well as to edit each isoline in regard to value, linestyle (solid, dotted, dashed, dashdot) and thickness.

frequently mistakes [back]

There are all sorts of sources to do mistakes, but only the most frequently occuring are discussed here:

Modify the presentation afterwards [back]

After drawing a plot, the data which have been used are stored in a variable "P".

The most used features to improve a presentation and how they are used is described here.


Subroutinen [top of the page]

Further matlab routines created especially to work with SeaBird data are:
sbread(Datei,ih)
schreiben().
Jürgen Holfort
Last modified: Fri Mar 5 18:17:04 CET 2004