Creating Plots of T and S Fields

next up previous

Creating Plots of T and S Fields

Once you have created the fort.* files for a given geographic region, you can create PostScript plots of the salinty and/or temperature fields.

Move the fort.* files, if necessary, to the directory containing the shell scripts S_extr.plt and T_extr.plt.

Examine the range of values in the fort.* files to create custom color palette files.

An easy way to do this is to use the sort command. For example, to find the minimum and maximum salinity values in fort.31, give the command

sort -n +2 fort.31 > fort_31.sort

then just look at the third value in first row of fort_31.sort to find the minimum value and third value in the last row to find the maximum value.

Suppose you find that the range of values in fort.31 (or fort_31.sort) is 32.0-35.0; then 33.5 is the midpoint value. If you wish to create a color palette with six intervals and a spacing of 0.5 per interval, use the command

makecpt -C0.5 -S6c -M33.5 -Z > salt.cpt

Be sure to use salt.cpt as the output name when creating palettes for salinity figures and temp.cpt when creating palettes for plots of temperature fields.

Edit files S_extr.plt and T_extr.plt so that the values assigned to the w, e, s, and n variables are the west and east longitudes and south and north latitudes, respectively, of the boundaries of the geographic region.

Execute S_extr.plt to make plots of salinity fields and/or T_extr.plt to make plots of temperature fields.

In their original form each of these scripts will write five PostScript files. S_extr.plt writes sal_31.ps, sal_32.ps, ... ,sal_35.ps, which are plots of the salinity fields for winter, spring, summer, fall, and a full year, respectively. T_extr.plt writes temp_21.ps, ... ,temp_25.ps, which, respectively, are winter, spring, summer, fall, and annual plots of the temperature fields. Either script can be easily edited so that plots will be produced for only some of these time periods. (Comments in the scripts indicate the needed changes.)

Print the PostScript file(s) or view with ghostview.

NOTE: In order to include the full title in the plot, it may be necessary for you to edit the PostScript files to increase the last value in the BoundingBox statement (second line of the *.ps files).