Home| superdarn |src.bin|tk|plot| grid_plot Index

grid_plot

Syntax
grid_plot --help
grid_plot [options] gridname [inxname]
grid_plot -stdout [options] gridname [inxname]
grid_plot -png [options] gridname [inxname]
grid_plot -png -stdout [options] gridname [inxname]
grid_plot -ps [-xp xoff] [-yp yoff] [options] gridname [inxname]
grid_plot -ps -stdout [-land] [-xp xoff] [-yp yoff] [options] gridname [inxname]
grid_plot -ppm [options] gridname [inxname]
grid_plot -ppm -stdout [options] gridname [inxname]
grid_plot -ppmx [options] gridname [inxname]
grid_plot -ppmx -stdout [options] gridname [inxname]
grid_plot -xml [options] gridname [inxname]
grid_plot -xml -stdout [options] gridname [inxname]
grid_plot -x [-display display] [-xoff xoff] [-yoff yoff] [-delay delay] [options] gridname [inxname]
Synopsis

Plot the grd and grdmapformat files.

Options
--helpprint the help message and exit.
--versionprint the RST version number and exit.
-cf cfnameread command line options from the file cfname.
-oldthe input file is in grd format.
-defplot using some sensible default options so that the user will see something plotted.
-sd yyyymmddplot starting from the date yyyymmdd.
-st hr:mnplot starting from the time hr:mn.
-ed yyyymmddstop plotting at the date yyyymmdd.
-et hr:mnstop plotting at the time hr:mn.
-ex hr:mnplot an interval whose extent is hr:mn.
-tngenerate filenames of the form hrmn.sc.xxx.
-dngenerate filenames of the form yyyymmdd.hrmn.sc.xxx.
-mnuse the time of the midpoint of each record to generate the filename.
-wdt widthset the width of the plot to width.
-hgt heightset the height of the plot to height.
-padpadset the padding around the edge of the plot to pad.
-sf scaleset the scale factor (magnification) to scale. The default scale factor is 1.
-orthouse an orthographic projection.
-lat latcenter the plot on the latitude given by lat.
-lon loncenter the plot on the longitude given by lon.
-latmin latminadjust the scale factor so that the lowest visible latitude is latmin. Applies when the stereographic projection is used.
-maguse magnetic coordinates.
-old_aacgmuse older AACGM rather than default AACGM-v2 for magnetic coordinates.
-rotaterotate the plot so that the local noon is at the top of the plot.
-flipflip the direction of the X-axis.
-squareforce the use of a square bounding box around the plot.
-coastplot coastlines.
-fcoastplot filled coastlines.
-bndplot state boundaries.
-grdplot a grid.
-grdlat grdlatset the latitude spacing of the grid to grdlat degrees.
-grdlon grdlonset the longitude spacing of the grid to grdlon degrees.
-igrdplot the inverse grid, if the plot is in geographic coordinates, a geomagnetic grid is plotted, if the plot is in geomagnetic coordinates, a geographic grid is plotted.
-igrdlat igrdlatset the latitude spacing of the inverse grid to grdlat degrees.
-igrdlon igrdlonset the longitude spacing of the inverse grid to grdlon degrees.
-igrdontopplot the inverse grid on top.
-grdontopplot the grid on top.
-tmkplot a clock-dial grid showing the time.
-fovplot the radar field of view.
-ffovplot the filled radar field of view.
-gfovonly plot fields of view of the radars contributing data (when using -fov and/or -ffov).
-tmtick tickset the grid interval for the time clock-dial to tick hours.
-lstuse local solar time rather than local time.
-termplot the terminator.
-ftermplot a filled terminator.
-tmlblLabel the time clock-dial.
-lnewdt lnewdtset the line width to lnewdt.
-bgcol aarrggbbset the background color to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-txtcol aarrggbbset the color of the text to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-grdcol aarrggbbset the color of the grid to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-igrdcol aarrggbbset the color of the inverse grid to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-cstcol aarrggbbset the color of the coastline to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-bndcol aarrggbbset the color of the state boundaries to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-lndcol aarrggbbset the color of the land to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-seacol aarrggbbset the color of the sea to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-tmkcol aarrggbbset the color of the time clock-dial to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-fovcol aarrggbbset the color of the field of view outline to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-ffovcol aarrggbbset the color of the filled field of view to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-vecccol aarrggbbif a colorkey is not used then set the color of vectors aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-trmcol aarrggbbset the color of the terminator outline to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-ftrmcol aarrggbbset the color of the filled terminator outline to aarrggbb, specified as the hexadecimal value for the 32-bit alpha,red,green and blue component color.
-vkey vkeynameload the velocity colorkey from the file vkeyname.
-vkey_path vkey_pathload the velocity colorkey from the custom path vkey_path.
-xkey xkeynameload the extra colorkey (used to plot power or spectral width) from the file xkeyname.
-xkey_path xkey_pathload the extra colorkey from the custom path xkey_path.
-rawplot raw line of sight velocity vectors.
-mrgplot merged two-dimensional vectors.
-pwrplot power.
-swdplot spectral width.
-avgif a cell contains more than one data point, plot the average power or spectral width.
-maxif a cell contains more than one data point, plot the maximum power or spectral width.
-minif a cell contains more than one data point, plot the minimum power or spectral width.
-vkeypplot the color key for the velocity scale.
-xkeypplot the extra color key for the power or spectrral width scale.
-vecpplot the example vector.
-vsf vsfset the vector scale factor to vsf.
-vrad vradset the radius of the dot a the vector root to vrad.
-logoplot the logo and credits.
-timeplot the time of the plotted data.
-vmax vmaxset the absolute velocity scale maximum to vmax.
-pmax pmaxset the power scale maximum to pmax.
-wmax vmaxset the spectral width scale maximum to wmax.
-frameadd a frame around the borders of the plot.
-overthe output plot will be overlaid on another plot, do not paint the background with the bacground color.
gridnamefilename of the grdmap format file to plot.
inxnamefilename of the index file associated with the grdmap format file to plot.
-stdoutplot a single data record and write the plot to standard output.
-d yyyymmddplot the data on date yyyymmdd (when using -stdout).
-t hr:mnplot the data at the time hr:mn (when using -stdout).
-pngproduce a Portable Network Graphics (PNG) image as the output.
-psproduce a PostScript plot as the output.
-xp xoffset the X offset of the PostScript plot to xoff.
-yp xoffset the Y offset of the PostScript plot to yoff.
-ppmproduce a Portable PixMap (PPM) image as the output.
-ppmxproduce an extended Portable PixMap (PPMX) image as the output.
-xmlproduce an XML image representation as the output.
-xplot the data on an X-terminal.
-display displayconnect to the xterminal named display.
-xoff xoffopen the window, xoff pixels from the left edge of the screen.
-yoff yoffopen the window ypad pixels from the top edge of the screen.
-delay delayset the delay between frames to delay milliseconds, a value of 0 will pause the frame until a mouse button is pressed. Default: 0
-chishamdraw radar fields of view using the Chisham virtual height model.
Description

Plot the grd and grdmapformat files.

The output can be to an X terminal, XML rplot file, Portable PixMap (PPM) file, extended Portable PixMap (PPMX) file, Portable Network Graphics (PNG), or PostScript file. The default output is PostScript.

The program usually steps through the gridded data and writes each plot to a file. The output filenames are of the form "nnnn.xxx", where nnnn is the frame number starting at 0000 and xxx is the suffix "xml","ps","ppm", or "ppmx". The options "-tn" and "-dn" can be used to change this format to one based on the time of each plot.

If the "-stdout" option is used then the program will just plot a single record from the file and the plot is written to standard output. The "-d" and "-t" options are used to select the time to plot.

The task only plots what it is instructed to plot on the command line which means that at least some of the options must be included if the plot is to show anything.

The default map projection is a stereographic projection.

A sensible set of default plot options can be invoked using the "-def" option. This will plot a stereographic projection of line of sight vectors in geomagnetic coordinates. The plot is rotated so that magnetic noon is at the top.

The program usually plots the line of sight velocity vectors contained in the grid file. However the options "-pwr" and "-wdt" can be used to plot the power and spectral width information stored in extended grid files as an extra parameter.

The options "-vkey" and "-xkey" allows a user defined color key to be used to plot the velocity vectors or the extra parameters.

The color key file is a plain text file that defines the red green and blue components for each index in the color bar. Any line in the file beginning with a "#" is treated as a comment and ignored. The first line that is not a comment defines the number of entries in the table. The remaining lines in the file contain color values for each index, one value per line. The values are hexadecimal numbers of the form aarrggbb, where aa is the alpha component, rr is the red component, gg is the blue component and bb is the blue component.

The number and complexity of the command line options makes typing them a laborious process, especially when producing multiple plots. To solve this problem, command line options can be placed in plain text file that can be parsed by the program using the " -cf" option. This allows the user to create a set of configuration files for producing different plots.

Examples
grid_plot -old -x -def -vkey superdarn.key 20040620.grd

Plot gridded data from the file "20040620.grd" on the X-terminal. Use the default set of options and the color key "superdarn.key".

grid_plot -ps -dn -st 12:00 -mag -rotate -fcoast -coast -fterm -tmk -vecp -vkeyp -time -raw -vkey superdarn.key 20021219.grdmap

Generate PostScript plots of gridded data from the file "20021219.grdmap". Store the plots in files named "yyyymmdd.hrmn.sc.ps", starting at 12:00UTC. Use a stereographic projection in magnetic coordinates, rotated so that magnetic local noon is at the top of the plot. Plot filled coastlines, terminator, a clockdial representing time, a labelled sample velocity vector, the velocity color bar, the time, and the line of sight vel;ocities. The velocity color bar is taken from the file "superdarn.key".



grid_plot -stdout -t 12:00 -pad 0 -mag -lat 84.4 -lon 55.00 -square -sf 2.00 -fcoast -coast  -vecp -xkeyp -time -raw -max -pwr -xkey rainbow.key 20021219.grdmap > grd.rp.xml

Generate a single rPlot XML plot of the gridded data at 06:00UTC from the file "20021219.grdmap". Use a stereographic projection in geographic coordinates and center the plot on latitude 84.4 degrees and longitude 55.00 degrees. Plot filled coastlines, filled radar fields of view, a labelled sample velocity vector, the power color bar, the time, line of sight velocity vectors, and the maximum observed power in each cell. The power color bar is taken from the file "rainbowkey". The plot is stored in the file "grd.rp.xml".