-
grid_file (character)
The name of the file holding the grid data.
In the case of a spectral element data, the file should contain
the spectral grid. Otherwise, if contouring x-y data, set it to
"structured_grid mx ny" where mx and ny are the number of
points in the x and y directions, respectively.
These 3 entries should be separated by blank spaces.
-
scale, shift (real)
parameters to scale and shift the data as in
data_new = data_old*scale + shift
-
xmin, xmax, ymin, ymax (real)
The minima and maxima of the grid in user coordinates.
They are irrelevant if imap=3 (a map projection is used).
They are important in the case of a structured_grid.
They should reflect the extremal coordinates of the data.
-
icartmap (integer)
Flag to indicate if a map projection is desired.
If set to a non-zero value, the parameters defining the
projection should be present in the next 6 lines.
icartmap takes the following values:
-
0 no map projection, line 5-10 below must be omitted.
-
1 a map projection is desired, and the continental outlines
are those of NCAR.
-
2 same as 1, except that the continents are colored with
whatever color is in index color 2.
-
-1 a map projection is desired, but the continental outline is
that of xcoast. The environment variable XCOASTDATA should
point to the place where the file is located. Currently
mine is pointing to "/u1/coasts/coast0.lines".
-
-2 a map projection is desired, the xcoast continents
are used, and an isobath is drawn (as for the Abyssal Basin
of the Eastern Mediterranean). The environment variable
ISOBATH must point to the isobath data file.
My file is located in "/d2/mohamed/rmed/xcoast.isobath".
-
< -2 For integers less than -2, only the isobaths are drawn.
-
JPRJ (character)
Defines the type of projection (e.g. ME for mercator, OR for
orthographic). Check the NCAR manual for the list of
projections available.
-
PLAT, PLONG, ROTA (real)
The latitude, longitude and rotation angle of the projection.
Their meaning depends on the type of projection used.
-
JLTS (character)
Decide on the extent of the map to be drawn.
JLTS can take the following values:
-
MA the maximum visible portion of the map is drawn.
-
CO the data on line 8 specify corner locations
-
AN the data on line 8 specify angles from center of
projection.
-
P1, P2, P3, P4 (real)
The meanining of the above paremeters change depending on the
type of projection (JPRJ) and area definition (JLTS). For
JPRJ=ME and JLTS = CO, P1 and P2 are the latitudes and
longitudes of the lower left corner of the map; P3 and P4 are
the latitudes and longitude of the upper right corner.
-
JGRD (real)
Increments in degrees in case a lon-lat grid is desired.
Has never really worked for some reason. I set to 0.
-
XOFF, YOFF (real)
Indicate the offset of the grid upon projecting lat-lon to x-y
space. These parameters are now obsolete.
-
lft, rgt, bot, top (real)
Position of the map on the plotter frame. These numbers must
be between 0.0 and 1.0.
-
lft: distance from left border to left edge of the plot,
suggested (0.05)
-
rgt: distance from left border to right edge of the plot,
suggested (0.95)
-
bot: distance from bottom border to bottom edge of the plot,
suggested (0.05)
-
top: distance from bottom border to top edge of the plot,
suggested (0.95)
-
xc1, xcm, yc1, ycn (real)
In the case of a structured grid with MxN points,
-
xc1 defines the position of the data point corresponding
to X(1), it is 1.0 for a spectral element contour.
-
xcm defines the position of the data point corresponding
to X(M), it is -1.0 for a spectral element contour.
-
yc1 defines the position of the data point corresponding
to Y(1), it is 1.0 for a spectral element contour.
-
ycn defines the position of the data point corresponding
to Y(N), it is -1.0 for a spectral element contour.
These numbers should be not be changed from their mandated
value for spectral element contouring. If a structured grid is
being contoured, then these numbers should be exactly as
listed in line 2 for (xmin,xmax, ymin, ymax).
-
imap (integer)
informs the NCAR contouring routine if mapping is applied.
imap should always be set to 3 for spectral element contouring.
If contouring on a structured grid, imap should be set to 1.
If sigma-levels are used in the vertical a la SCRUM, imap
should be set to -3.
-
icolor (integer)
Decide whether to color the contour levels. If it is
non-zero contours are colored. The palette depends on
the value of icolor:
-
1: the palette is generated internally.
-
2: Hernan's palette gs1.pal.white is used.
-
3: for 3 and greater the code expects a file name in
the following line that will hold the palette. It should be
in the same format as gs1.pal.white.
-
-3: contour lines are omitted, only colors are drawn
If icolor > 0, then a color bar is drawn. The
parameters can be controlled through a file which must
be indicated by the environment variable COLORBAR_FILE,
e.g. setenv COLORBAR_FILE /d2/mohamed/plot/colorbar.hz.
If this environment variable is not set, the default
values are used, which places the color bar
vertically. The parameters that can be controlled are:
orientation, fill height and width, (x,y) extents of
the color bar, and the FORMAT of the labels.
The names of few color palette files are hard coded, they should
be changed prior to compilation on a new system. They are all located
in contcolr.F. The file names are
-
a. '/d1/mohamed/plot/gs1.pal.white'
-
b. '/d2/mohamed/plot/palette.moe'.
-
spectral (integer)
Choose the interpolation algorithm for the spectral element
contouring. If set to -1, a spectral interpolation is first
applied to the data to find the value of the function on a
uniform dense grid (the square of the number of collocation
points per element) before contouring the data. If contouring
spectral element data, it is best to leave set to -1.
-
ncl (integer), ciu (real),
autocontours (integer), cmn (real)
Decide on the choice of contour levels.
-
ncl: number of contours.
-
ciu: increment of contour levels if autocontour set to 0.
-
cmn: minimum contour level if autocontours set to 0.
-
autocontours: flag to indicate how to decide on the contours;
it takes the following values:
-
0 : use a linear function to set the contours. Thus the m-th
contour is given by zlev(m) = cmn + (m-1)*ciu.
-
1 : use the minimum and maximum of the data to decide on
cmn and ciu, then cmn = minimum of data and
ciu = (data_max-data_min)/(ncl-1)
-
-1 and smaller, and the contour levels must be provided
indivdually by the user. This is useful if contour level
increment have to be controlled closely.
-
iformat, nframes (integer)
iformat: decide on the format of the data. If it is less than
zero, the data to be read must be binary, else the data is in
ascii form. iformat understands the following values:
-
0 : data is read in ascii as in
read(7,*) (data(i), i=1,MN)
-
-2 : the data is read from a fortran-written binary file, and
is in nodal form.
-
-3 : same as for -2.
-
-4 : the data is read from a fortran-written binary file, and
is in elemental form.
-
-5 : the data is read from a c-written binary file, the
option is mostly for Enrique's benefit.
-
-6 : Read elemental binary data defined on the Gauss-Legendre
points. (for discontinuously-staggered pressure contours).
nframes is the number of frames to draw. If nframes is set to
0 it draws all the frame available in the data set up to a
maximum of 1000.
-
data_file (character)
The name of the file containing the data.
-
xfstg, yfstg, timei, dtime (real)
parameters to draw a title for the plot.
-
xfstg: x-location of the title string in plotter coordinates.
0 <= xfstg <= 1. recommended (0.5)
-
yfstg: y-location of the title string in plotter coordinates.
0 <= xfstg <= 1. recommended (0.97)
-
timei: time-stamp of initial frame.
-
dtime: time-interval between frame.
timei and dtime are used to stamp a number (usually meant to
indicate simulated time) at the end of title string. The time
of frame iframe is: (iframe-1)*dtime + timei
-
string (character)
The title string
-
wholesphere (integer)
flag to indicate if the wholesphere is considered. It takes
the values:
-
0 : map does not cross the date line.
-
1 : grid crosses the date line.
-
iso_elements (logical)
-
T: the spectral truncation is the same in the x and y
directions.
-
F: the spectral expansions in x and y are different. This is
useful to draw the vertical sections spectrally.
-
draw_elements (logical)
If true the border of the elements are drawn. This is useful to
locate the number of the elements with interesting (usually
troubling) features.
-
draw_continents (logical)
flag to draw continents.
True : Continents are drawn.
False : Continents are not drawn (like for the sector).
-
tick_marks (integer)
flag to draw the tick-marks and write the labels on the
x and y axes. No tick-marks or labels are drawn if tick_marks
is set to 0.
-
draw_vectors (logical)
flag to draw vectors. if true, additional information must be
provided. Set to false if running contours, and to true if
running vectors. (no more data is needed for contouring).
-
file_data (character)
file name holding y-component of the vector to be drawn.
-
ix, iy (integers)
x-y increments at which to draw vectors.
-
veclen, flo, fhi (real)
parameters controlling the drawing of vectors:
veclen: vector length
flo: low cut-off
fhi: high cut-off
Here are a few sample contouring scripts:
- Picture
script
of a vertical slice with sigma mapping in the vertical
- Picture and
script
of a contour plot on a SEOM grid.
- Picture and
script
of the same contour plot on a structured grid.
The interpolation was done from a SEOM grid using interp2d.
- Picture and
script
of a color structured-grid-contour plot. You can take a look a at
the colorbar-file used to control the
lay-out and labelling of the color bar.
The gmeta files produced by NCAR Graphics were translated to gif format
using the following command:
ctrans -d sun -res 600x600 gmeta | rasttopnm | ppmtogif > zt.gif
See
href=http://ngwww.ucar.edu/info/faq.html#ConvertGif
for more information on how to translate gmeta files into other
formats.