WXP
Program Reference

gridplot

Sections

NAME

gridplot - Grid/GRIB data plotting

SYNOPSIS

gridplot [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default wxp.cfg Sets the name of the resource file.
-na=name name gridplot Specifies the name used in resource file parsing.
-me=level message out2 Specifies level of messages to be displayed
-fp=path file_path the current directory Specifies location of database files.
-dp=path data_path the current directory Specifies the location of the input raw data files.
-cp=path con_path the current directory Specifies location of decoded/converted data files
-gp=path grid_path the current directory Specifies location of gridded output files from WXP.
-ip=path image_path the current directory Specifies location of output image files (.gif/,png) from WXP.
-nc=name_conv name_conv name.cnv or name_conv file This sets which name convention file to use.
-if=in_file in_file grib Specifies the input file name tag. This value can also be specified with the model resource by looking up the naming convention in the model.lup file. The default is grib, but it can be modified to any value in the filename convention file. A full name convention can be specified as well.
-of=out_file out_file none Specifies what type of grid file to create. The program will generate grids using the processing in the gridplot.var file. By default, these grids are not saved. To save these grids, the out_file resource must be specified with a name convention to save these files. The grids will be saved as WXP binary grid files unless otherwise specified.
-mf=filename... map_file wxp.map Specifies the name of the map database file. Multiple maps can be specified along with attributes to describe how to draw the map.
-cu=[hour] current none This specifies to use current data files.
-ho=hour hour none Specifies the exact hour that a data file is valid for.
-mo=model model None Sets the input forecast model
-pd=domain plot_domain Domain of the input grid Sets the plotting domain
-ft=time time init Sets forecast time
-le=level level none Sets the vertical level
-va=variable variable none Sets the parameter/variable to be displayed
-pl=type plot_type Program dependent, normally user prompt Sets the type of output plot
-sc=type plot_scale 1.0 Specifies a scaling factor for all plotted text, symbols, vectors, etc.
-fm=format format None Specifies the output format of data.
-pa=param[,param...] parameter none Specifies addition parameters to program.
-dr=value[,value...] draw all Specifies which part of the plot is to be drawn.
-la=type label Program defaults Specifies the labels to be plotted around the plot. By default, labels are generated by the program and plotted above and below the plot. This resource overrides these labels.
-ci=value con_interval 0 Specifies the contour interval to use in contouring grids. This can also be used to color code plotted data and vectors.
-cb=value con_base lowest contour value, max wind speed or 0 depending on application Specifies the base value for color fill contours, and wind speed per grid distance.
-fl=font_file[,font_file...] font_list modern.fnt Specifies a list of fonts to use in the plots.
-ct=color_table color_table wxp.clr Specifies the color table to use in the plot. This maps color names to actual RGB color values.
-col=color[:attribute...] color_label white (black on inverse plots) Specifies the text color for labels above and below the plot.
-com=color[:attribute...] color_map red (for most programs) Specifies the color for background maps.
-coll=color[:attribute...] color_latlon magenta:st=dsh Specifies the color for lat/lon lines.
-cofm=color[:attribute...] color_fmap black Specfies the map color for color fill plots.
-coco=color[:attribute...] color_cont white (black on inverse plots) Specifies color for line contours
-cof=[value:]color[:attribute...],[value:]color[:attribute...],...
-cof=filename
color_fill magenta, lmagenta, blue, lblue, cyan, lcyan, green, lgreen, brown, yellow, red, lred, dgray, lgray, white Specifies the colors in the color fill contours.
-cocl=color[:attribute...] color_clabel white (black on inverse plots) Specifies color for line contour labels.
-cofl=color[:attribute...] color_flabel black Specifies color for color fill contour labels
-de=device[,parameters] device d for display Specifies the output device.
-ti=title title The name of the program or the value of the name resource Specifies the window title.
-ic icon off Specifies whether to open window in iconified mode.
-bg=color background black Specifies the background color of the window.
-ge=widthxheight[+x+y] geometry 640x512 (for windowed plots) Specifies the window and paper geometry.
filename (positional) filename none Specify input filename

DESCRIPTION

This program contours model gridpoint data. For the most part, this is data stored in GRIB format. GRIB is a compressed binary format ideal for storing model data for operational visualization. This program is set up to adapt to many types of model and file formats. The forecast time, level and variable parameters are set up to mimic GRIB parameters so that any model grid can be queried using gridplot. In addition, there is a way of automatically piecing component grids together prior to display. Then, based on a plot domain, forecast time, level and variable, a contour plot is generated. Overlay plots, contour plots and loops can also be generated if the appropriate options are set.

The program will display data from many model sources. The model type is specified using the resrc:model resource. The specified string is looked up in the model.lup file which cross-references the model value to a file naming convention. Also, if the model grids are divided up, this lookup file will detail how the grids are to be pieced together. In many cases, global models are split into 4 or even 8 subgrids. Contouring the entire global grid may not be necessary for small domains such as North America. As a result, specialized pieced grids can be developed such as avn_na which will direct grbcalc to search and piece together only those grids that affect North America. In other cases, a specific model grid file will contain grids for more than one grid domain. The lookup file can direct grbcalc to only use specific grids from a specific domain. This is the case with the ETA model which is broadcast in two grid types: 211 and 207 (for Alaska).

The programs starts off by prompting the user for input grid file name. The list of available grid files is based on the file name convention which is dependent on the model type and the file name tag associated with it. The tag can be specifically changed with the resrc:in_file resource. The user may specify the input file either via the command line of through the resrc:current resource.

Next, the program prompts the user for the forecast time. This is done through a forecast time menu which is specified in the grbcalc.tim file. Remember, each model type has a specific set of valid forecast times which is defined in the time file. Because of the breadth of models available, not all of the model types will be covered. Even though a menu does not list an appropriate time, it is still accessible be specifically stating the time on either the command line or at the menu prompt.

After the forecast time has been set, the vertical level is prompted for. A level menu is displayed which covers most of the usable levels. This can be tailored with the grbcalc.lev file. Again, each model has a set of valid levels and the menu may not give a proper list of levels. If the level is unknown, a value of "miss" can be used and the program will search for the first grid that matches both forecast time and variable type.

The program will now prompt the user for the particular variable to contour. The program will show a menu of commonly used variables but many more are defined internally by the GRIB products and listed in the grbcalc.var file. The GRIB variables can be queried with the griblook program.

Sample Internal Variables
Variable Description and units Plots
temp Temperature (K) grid
rhum Relative humidity (%) grid
uwnd U wind component - EW relative (m/s) grid
vwnd V wind component - NS relative (m/s) grid
vvel Vertical velocity (Pa/s) grid
hght Geopotential height (m) grid
pres Pressure (Pa) grid
prec Quantitative precipitation (m) grid

These parameters can be accessed by name if they have not been redefined in the grbcalc.var file. Otherwise, prepending a "+" to the variable name will guarantee these variables will appear.

There are several derived variables from this list which are defined in the grbcalc.var file. These include composite plots, overlay plots and computed grids.

Sample Derived/Composite Variables
Variable Description Plots
wind A vector quantity of <uwnd,vwnd> vector
conv Wind convergence (/s) positive is convergence grid
mconv Moisture convergence (/s) grid
rvort Relative vorticity (/s) grid
avort Absolute vorticity (/s) grid
tadv Temperature advection (K/s) grid
madv Moisture advection (/s) grid
vadv Vorticity advection (/s^2) grid

The plot domain defaults to the domain of the grid unless changed through the resrc:plot_domain resource. The domain can be interactively changed using the mouse once the plot has been generated.

The program will now open the graphics window and start processing the data. The user will be prompted for the output device. Then the grid file is opened and data read in. The piecing of grids will be done at this time. Any additional computations are performed to produce a derived variable. The background map will plot first unless the output is a color fill contour in which the map plots last. Then, the maximum and minimum of the grid are displayed for the user to pick an appropriate contour interval. Then, the contour or vector plot will display.

There are several plot types. For contour plots, there is:

For vectors:

When the plot is complete, output can be saved to a GIF image file, spooled to the printer or the plot can be zoomed. When zooming the image, the plot will redraw to the new domain. It will also add more stations to the plot depending on the size of the domain. When the user is finished with the plot, the enter key can be hit which closes the window and returns the user to the variable prompt.

Output Files

By default, this program does not produce output files. If a raw or grid file output is desired, use the out_file resource to enable this. By default, this will create a WXP ASCII raw or grid file depending on the plot type. The out_file can be a filename, a file tag (lookup in file name convention file) or a name convention (with wildcards). The output can be GIF file by specifying gif as the file type. It may be desirable to turn plotting of when producing output files. To do this, specify none for the plot_type resource.

EXAMPLES

FILES

SEE ALSO


Last updated October 2013