MPLOT98v1.3 User manual

Section 10:Uniras Extension - umplot98

Section 10.1:Overview

An UNIRAS extension to the mplot98 program enables the user to produce 2 dimensional isoline plots of the current screen image, in addition to the conventional PostScript files. This option is only available for horizontal plots.

An isoline image is produced from a uniras description file (udf), which is created each time a request for an isoline plot is made ( apart from if the there has been no change in the image since that last time this option was selected). The user may interactively edit the udf file using a vi editor to change the default settings in the udf file to create a customised image.

Before using this option, it is advisable that the user familiarise themselves with the contents of a udf file. This will make the customisation of udf files easier.

Section 10.2: Information stored in a udf file

An udf file contains several parameters for creating an isoline plot. This includes information about the data ( i.e. source file, variable and level) and information about the contours to be used.

Example of a udf file

#UNIRAS IMAGE DESCRIPTION FILE
#
#Metadata about dataset used for image
#Source file:/data/jrd/occam/averages/year9.restart1
#Dataset name:FREE SURFACE HT  Level:0 
#
DATASET NAME:FREE SURFACE HT
#
PLOT TITLE :FREE SURFACE HT
#
#Dimension sizes of sub array
#
#IMIN:  341  IMAX:  700  JMIN:  227 JMAX:  371
#
#Co-ordinate Values
#
#XMIN: 85.25 XMAX:175.25 YMIN:-21.50  YMAX: 14.75
#
#Min/Max used for current area
#IMAGE MINIMUM:   44.29 IMAGE MAXIMUM:   99.39
#
#Use Contour levels from existing udf file[0:False 1;True]
#
USE CONTOUR LEVELS FROM EXISTING UDF FILE                    : 0
#
#Name existing file you wish to use
NAME OF EXISTING UDF FILE                                    : None
#
#Use regular interval contour levels [ 1:true 0:false]
#
USE REGULAR CONTOUR INTERVALS                                : 0 
#
#Change variables if using regular contour intervals
#Maximum number of contour levels (30) 
NUMBER OF CONTOUR INTERVALS                                  : 5 
FIRST CONTOUR INTERVAL                                       : 50.00    
CONTOUR INTERVAL                                             : 10.00 
STANDARD CONTOUR LINE WIDTH                                  : 0.10  
#
#Information for associated colour contours
#Contour interval should be an integer mulitple of one above - max number 36 
#
COLOUR CONTOUR MODE                                          : 0
NUMBER OF COLOUR CONTOURS                                    : 5 
FIRST COLOUR CONTOUR                                         : 50.00    
COLOUR CONTOUR INTERVAL                                      : 10.00    
COLOUR CONTOUR LINE WIDTH                                    : 0.20  
#
#Fill in table if setting  own contour levels 
#Maximum value should not exceed 30 
#Colour Index should be in range of 16 to 52 
NUMBER OF USER SPECIFIED CONTOUR INTERVALS                   : 5 
INDEX      CONTOUR LEVELS    COLOUR INDEX   CONTOUR LINE WIDTH  
1          50.00             1              0.10                
2          60.00             1              0.10                
3          70.00             1              0.10                
4          80.00             1              0.10                
5          90.00             1              0.10                
#Overlay gridding [1: True 0:False ]
#
OVERLAY GRID                                                 : 1
#
#Intervals for overlaying grid values default:5.0
GRID INTERVAL                                                : 5
#
#Isoline annotation information - non-rotated data only
#
TEXT_HEIGHT: 2.000000  DECIMAL_PLACES:2  ANNOTATION_GAP:-100.000000\
#
#colour scale options allows user plot legend
SCALE DISPLAY MODE                                             :1

#Enter output file mode (s mx11;e - display)
OUTPUT FILE:smx11
#
#Enter name of archive for current udf file
ARCHIVE NAME FOR CURRENT UDF FILE                            :mplot.udf 
#
#END OF UNIRAS DESCRIPTION FILE
#

The Source File is the name of the data file from where the data is to be taken from. The dataset name, is the unique name given to each dataset in a HDF file, and the level specifies which horizontal level the data refers to. A surface field will often have the value 0. If the dataset is a three dimensional dataset, the level variable refers to the index of the horizontal section to be extracted from the file. All lines in a udf file beginning with the '#' character are ignored, since they carry additional information in the file.

DATASET_NAME: The dataset name parameter specifies the unique name of the dataset to use from the current file/s. This is a unique name in a file.

PLOT_TITLE: Specifies title to be used on the isoline plot. By default this is the name of the current variable selected. This variable can be altered independantly so the user can specify their own title for the image.

IMIN, IMAX, JMIN, JMAX: Integer values of the array co-ordinates of data points which mark the edges of the bounding box. If IMIN > IMAX, this means that xcyclical data has been plotted and the image is straddling the Greenwich Meridian.

XMIN, XMAX, YMIN and YMAX: Real space co-ordinate values of the array indices. If the data is from a rotated dataset, the co-ordinates are real space co-ordinates transformed from model space co-ordinates. If the data is from a non rotated dataset and IMIN > IMAX, the values for the longitude are given in the range -180.0 to +180.0 degrees, otherwise the values for longitude are given in the range 0.0 to 360.0 degrees. These values are used for reference only. If the user has editied the imin,imax , jmin and jmax values from the original values, then these parameters are NOT updated with the new co-ordinates !!

IMAGE_MINIMUM, IMAGE_MAXIMUM: Specifies the minimum and maximum values used for the range of data displayed. The minimum and maxiumum values are one of three types

  1. Values specified by the user
  2. Minimum and maximum values of the data in the image bounding box
  3. Minimum and maximum values of the whole dataset.

USE CONTOUR LEVELS FROM EXISTING FILE: 0/1
NAME OF EXISTING UDF FILE: None

Decides which udf file to use for contour information. If the user wishes use an existing file, then the current udf file must be edited and a value of 1 should be set for the first line, followed by the name of the existing file in the NAME OF EXISTING UDF FILE line. If using another named udf file, then only the information regarding the contours and the overlying grid are used from this file.

USE REGULAR CONTOURS : 1

Specifies whether user wishes to use contour lines set at regular intervals. The user needs to enter values for the number of contour levels to be used, the value of the first contour interval, followed by a contour interval. Lastly the user needs to set the line width in mm. This information should be set using the following lines in the udf file. The maximum number of contour lines permissable is 30.

NUMBER OF CONTOURS:                  7
FIRST CONTOUR:                      34.20
CONTOUR INTERVAL:                    0.10
STANDARD CONTOUR LINE WIDTH:         0.10

Colour Contours;

COLOUR CONTOUR MODE 1
NUMBER OF COLOUR CONTOUR INTERVALS: 7
FIRST COLOUR CONTOUR INTERVAL: 34.20
COLOUR CONTOUR INTERVAL: 0.10
COLOUR CONTOUR LINE WIDTH: 0.10

These specify which of the contour lines are to be coloured and also sets their width. The algorithm for producing the colour contour values is the same as above and is specified below.

do i=1,ncontours
clevel(i) = (i-1)*contour_interval+first_contour
cwidth(i)=standard_contour_line_width
colindex(i)=1
enddo

To match the default contour intervals with the colour contour values , matching contour values are set to the respective colour and linewidth. If the COLOUR CONTOUR MODE option is set to 0, only the widths of matching contour values are used

If the user does not use the method of regular contour intervals, then the program will read the table of contour values, width and colour indices to plot the isoline image. This is the method which is used by default.

NUMBER OF USER SPECIFIED CONTOUR INTERVALS: 10

This is the method that is used by default, and is a table of contour levels produced using the intervals of the colour legend of the image. The user can edit this table, using upto 30 contour lines defined at different intervals. The user must specify how many contours they are using in the line above. The maxiumum number of contours which will read from a table is 30. The above line, specifies how many rows of data will be read from the following table. The table of information for the contour lines will be as follows:

INDEX        CONTOUR LEVELS         COLOUR INDEX      CONTOUR LINE WIDTH
1            34.40                   1                 0.1
2            34.60                   1                 0.1
3            36.80                   1                 0.1

The above list maybe interactively edited via the EDIT button on the UNIPLOT information window. The advantage of using this method, is that it is possible to define irregular contour intervals if required. The COLOUR INDEX column represents the colour to be used for that specific contour line. A default value of 1 (foreground) is used for all contour lines. If the user wishes to specify other colours, then any number between 16 and 52 can be used. The COLOUR LINEWIDTH column defines the width of the contour line (default value of 0.1 mm). The user may wish somechange this values to change the width of various contour lines.

OVERLAY GRID: 0/1

By default a grid will be drawn on the isoline image. A value of 0 in the above line, will inhibit the drawing of the grid. If the value is set to 1, then the user will have to specify additional information regarding grid spacing and grid text.

If the user has opted to draw a grid on the plot, then the grid spacing in degrees must also be defined. The default value for the grid spacing is 5 degrees. To specify a user defined grid spacing then the following line must be edited.

GRID INTERVAL: 5
TEXT_HEIGHT: 2.0 DECIMAL PLACES: 2 ANNOTATION GAP: -100.0

The above parameters specify the information required to draw text on the contour lines. Isoline annotation information is only permitted when plotting data from non-rotated datasets. The ANNOTATION GAP parameter specifies the contour interval that annotations should be drawn. The default settings for each of these variables are text_height (2.0), decimal places (2) and annotation gap (100.0). All values are given in mm.

SCALE DISPLAY MODE : 1

If the value of this option is set to 0 then no scale (legend) will be drawn on the isoline plot. The default setting for this option is 1, which means that by default, the legend will be drawn.

OUTPUT FILE: smx11

By default, the isoline plot will be displayed in a UNIRAS window on the screen. This is useful, should the user wish to preview the plot before creating a hard copy. To direct the plot to a postscript file, the name of a given file should be entered on this line. Unless a full directory path is specified, the file will be created in the current working directory.

ARCHIVE NAME FOR CURRENT UDF FILE: None

A udf file is created as a temporary file. Each time a new udf file is created, the old one is overwritten. To keep the current file, the user should enter the name of a file in the above space. The current udf file will then be written to this file. The archive udf file will be written in the current working directory. By archiving the current udf file, it means that the user can access the contour interval and the grid settings from a future udf file in order to produce a series of consistent plots.

occplot98:

Another important use of the archived udf files is an input to a FORTRAN utility program called occplot98. The utility will reproduce the isoline plot created interactively with umplot98 from the information stored in the UDF file. It is ideal for use in batch processing and has several other features. Further information can be obtained from the following page:

http://www.soc.soton.ac.uk/JRD/OCCAM/occplot98.html

Section 10.3: Using umplot98

An isoline plot can be produced by selecting the "Isoline Plot" option from the main menu (figure 10.1).

Figure 10.1

When this option has been selected, the uniplot information window will now be displayed. This gives the user information regarding the use of udf files and this option.

Figure 10.2

The user may wish to edit the udf file, or else use the current default parameters. If you do not wish to edit the file, then click once on the continue button and a new window will be opened on the screen displaying the isoline image.

Editing an udf file:

An udf file can be edited to allow the user to

  1. Change and/or set the contour information in the file or to name a udf file from which to take the contour and grid setting.
  2. Save the current udf to a named archive udf file in order to save the settings.
  3. To create a postscript file.
  4. To change the grid information in the current file.

1. Selecting and changing the contour parameters.

There are two ways in which the contour information can be set either a) by using regular contour intervals or b) by using a table of contour values.

a) Using regular contour intervals:

To change/edit the information which uses regular contours, the file should be opened and the following line found using the vi editor.

USE REGULAR CONTOUR INTERVALS: 1

If you wish to use a set of regular contours, the algorithm of which is explained above, then ensure that the value is set to 1. If any other value is used here, then the table of contours will be used. If the number of contours specified

NUMBER OF CONTOURS:                  7
FIRST CONTOUR:                      34.20
CONTOUR INTERVAL:                    0.10
STANDARD CONTOUR LINE WIDTH:         0.10

Colour Contours;

COLOUR CONTOUR MODE 1
NUMBER OF COLOUR CONTOUR INTERVALS: 7
FIRST COLOUR CONTOUR INTERVAL: 34.20
COLOUR CONTOUR INTERVAL: 0.10
COLOUR CONTOUR LINE WIDTH: 0.10

If the colour contour values are set, the contour lines will be drawn in different colours. A subset of the the contours maybe selected for colouring by choosing different multiples of the contour interval for the colour contour intervals.

If the number of contours exceeds the maximum allowable limit(30), the following error message will appear on the screen

Figure 10.3

b) Using a table of contour values:

The above documentation outlines how the information from the table of contours is handled. If the number of rows in the table is less than the number of contours specified, the number of contours will be automatically reset to the number of rows in the table.

The contour information can either be taken from the current udf file, or by using a named udf file, the name of which must be set in the current file. If using contours set in a different udf file, then the current udf file must be edited. To do this , select the EDIT option from the above window and open the vi editor. Find the following line in the file

USE CONTOUR LEVELS FROM EXISTING FILE: 0

and change the value to 1. Now go to the following line and add the name of the udf file after the colon

NAME OF EXISTING FILE: example.udf

Now close the current file, the program will read the data information from the current file, but use the contour information from the named udf file.

2. Archiving a udf file:

If the image changes, the last udf file created will be overwritten with the new parameters. The current udf file maybe edited and the current udf file saved to a named udf file. To name an archive file, select the following line from the udf file and enter the name of the file after the colon.

ARCHIVE NAME FOR CURRENT UDF FILE:

If the file named already exists, the following panel will be displayed

Figure 10.4:Overwrite file control panel

The user has now two options. Firstly, the can select the Overwrite tick box option and overwrite the file, which is shown in the text input object, or else they can rename the file. To re-name the archive file, click once using the left hand mouse button on the Rename tick box. This will now activate the text input object. Using the delete/backspace key, remove the name of the current file and then enter the name of current file and the click once on the Accept button. If the file does not exist, the udf file will be written to this file.

3. Creating a PostScript file of the current isoline plot

By default, the uniras isoline plot will be displayed on a seperate window on the screen. To send the output to a postscript file, the user must edit the following line in the udf file. Select the EDIT option on the information window to open the vi editor. Now search for the following line in the udf file

OUTPUT FILE:smx11

If the name of the output file is "smx11", this means that the output is redirected to the screen. Replace this text with the name of a file and close the vi editor. If the name of the output file already exists

Creating a Postscript file of the current isoline plot:

If the archive filename for the udf file already exists, then the following window will be displayed.

Figure 10.5:Overwrite Postscript filename control panel

The control panel operates in the same way, as explained in the previous section for archiving a udf file. When the filename has been entered, click once on the Accept button. You may have to wait a couple of seconds for the postscript file to be created before using the interface. If the Cancel button is selected. processing of a postscript file for the current image will be terminated.

Figure 10.6 shows an example of an isoline contour image.

Figure 10.6: Screen image displayed of a 2-D horizontal section of Sea Surface Height