WXP
Program Reference

sfcplot

Sections

NAME

sfcplot - Surface data plotting

SYNOPSIS

sfcplot [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 sfcplot Specifies the name used in resource file parsing.
-me=level message out2 Specifies level of messages to be displayed
  • out4 - gridding information
-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 the location (path) of the input surface converted data files. This may be modified in the name convention file.
-gp=path grid_path the current directory Specifies location of gridded output files from WXP.
-rp=path raw_path the current directory Specifies location of output raw files generated by WXP.
-ip=path image_path the current directory Specifies location of output image files (.gif/,png) from WXP.
-cf=filename city_file sao.cty Specifies the name of the city database file
-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.
-in=input input program specific Specifies the type of the input data.
-ou=output output program specific Specifies the output of the program.
-nc=name_conv name_conv name.cnv or name_conv file This sets which name convention file to use.
-if=in_file in_file program specific Specifies the input file name tag.
-of=out_file out_file program specific Specifies the output file name tag.
-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.
-nh=hours[,skip] num_hour Value Generally 0 Specifies the number of hours worth of data to use in the program
-tz=zone_name timezone UTC Sets timezone used in date labels
-pd=domain plot_domain program dependent, mostly "us" Sets the plotting domain
-gd=domain grid_domain Same as the plot domain Specifies the output grid domain
-pr=prior stat_prior Plot size dependent Specifies the station priority to use in filtering stations on the plot
-vf=file var_file none Sets the name of the variable file
-va=variable variable none Sets the parameter/variable to be displayed
-oa=filter[,radinf][,passes][,converg][,min_stats] object_param program dependent
Specifies the objective analysis parameters
-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.
-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.
-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.
-cod=color[:attribute...] color_data green (for most programs) Specifies the color for plotted data.
-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.
-com=color[:attribute...] color_map red (for most programs) Specifies the color for background maps.
-cog=color[:attribute...] color_grid red (for most programs) Specifies the color and attributes for background grids
-coll=color[:attribute...] color_latlon magenta:st=dsh Specifies the color for lat/lon lines.
-col=color[:attribute...] color_label white (black on inverse plots) Specifies the text color for labels above and below the plot.
-coco=color[:attribute...] color_cont white (black on inverse plots) Specifies color for line 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
-cofm=color[:attribute...] color_fmap black Specfies the map color for color fill plots.
-cogr=color[:attribute...] color_fgrid red (for most programs) Specifies color for grids on color fill plots
-de=device[,parameters] device d for display Specifies the output device.
-ge=widthxheight[+x+y] geometry 640x512 (for windowed plots) Specifies the window and paper geometry.
-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.
-iv inverse off Specifies an inverse window background (white)
-lo=type logo none Adds a logo to the image
filename (positional) filename none Specify input filename

DESCRIPTION

This program plots surface data on a background map. The input to the program is a surface converted file produced by the prog:sfcdec program. Then, based on a resrc:plot_domain and a variable selected by the user, a plot is generated. Overlay plots, contour plots and loops can also be generated if the appropriate variable options are set.

The programs requires three pieces of information:

The user may specify the input file either via the command line or through the resrc:current resource. The default is the latest file available. The input naming convention is specified by the sfc_cvt tag but this can be changed with the resrc:in_file resource. To generate a loop, the resrc:num_hour resource can be specified. This will tell the program to loop through this number of hours.

The region to plot is specified by the resrc:plot_domain resource. If none is specified, it defaults to the contiguous US. The domain can be interactively changed once the plot has been generated.

After the region has been set, the city database is read in and a cross-reference table is setup. Since converted data is not saved with location information, the program will refer to this table to location each station in the input file.

The variable to plot is specified with the resrc:variable resource. Some variables are internal to the program and more complicated plots can be specified with the variable resource or using the variables specified in the sfcplot.var file. The internal variables are:

Internal Variables
Variable Description and units Plots
city Station ID string
temp Temperature (F) value
ttd Temperature and dewpoint (F) value0=temp,
value1=dewp
dewp Dewpoint (F) value
dewd Dewpoint depression (F) value
wdir Wind direction (deg) value
wspd Wind speed (knt) value
wgst Wind gust (knt) value
wbrbc
wbrb
wind
Wind speed and direction (knt) value0=dir,
value1=spd
uwnd U wind component - EW relative (m/s) value
vwnd V wind component - NS relative (m/s) value
uwndg U wind component - grid relative (m/s) value
vwndg V wind component - grid relative (m/s) value
alt Altimeter setting (in_Hg) value
pres Sea level pressure (mb) use level parameter to get station/surface pressure value
pralt Sea level pressure or altimeter setting if sea level pressure is missing (mb) value
elev Station elevation (m) value
wx Present weather (SAO string) string
vis Visibility (mi) value, formatted string
cldcl Cloud ceiling (100 ft), string is "" for clear skies, value is 500 for clear value, formatted string
cldclc Cloud ceiling code (from synoptic code 0-9) value
cldcv Cloud cover (cloud string: C,F,S,O,X,0-8), converted to % for contouring. value=%, string
ptend Pressure tendency (mb) value, string=trend code
prec Precipitation (in) use time parameter to specify which type (3,6,12,24 hour) value
extt Extreme temperature (F) uses maximum if available, else minimum.
Use time parameter to specify which type (6,24 hour)
value
maxt Maxmium temperature (F) use time parameter to specify which type (6,24 hour) value
mint Minimum temperature (F) use time parameter to specify which type (6,24 hour) value
snwdp Snow depth (in) value
nlcld Amount of low clouds (code string) value=%, string=code
lcld Low cloud type (code string) string
mcld Middle cloud type (code string) string
hcld High cloud type (code string) string
solar Equivalent solar radiation (min) value
sst Sea surface temperature (C) value
wavper Wave period (sec) value
wavhgt Wave height (m) value
vpres Vapor pressure (mb) value
svpres Saturation vapor pressure (mb) value
wchilt Wind chill temperature (K) value
wchilf Wind chill factor (W/m^2) value
heat Heat index (K) value
humit Humiture (F) value
mrat Mixing ratio (g/kg) value
smrat Saturation mixing ration (g/kg) value
shum Specific humidity (g/kg) value
rhum Relative humidity (%) value
wetblb Wetbulb temperature (K) value
thetaw Wetbulb potential temperature (K) value
thetae Equivalent potential temperature (K) value
thetav Virtual potential temperature (K) value
theta Potential temperature (K) value
vtemp Virtual temperature (K) value
fr Flight rules (number and string: ) value=0, string=VFR
value=1, string=MVFR
value=2, string=IFR
value=3, string=LIFR
front Fronts (special plot type)  

These parameters can be accessed by name if they have not been redefined in the sfcplot.var file. Otherwise, prepending a "+" to the variable name will guarantee these variables will appear. Also, time can be specified for use with precipitation (anal-6acc::prec::%.2f with give 6 hour precipitation).

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

Derived/Composite Variables
Variable Description Plots
all All data, a composite plot of temperature, dewpoint, sea level pressure, cloud cover, winds and present weather. comp
allc Same as all except temperatures in celcius. comp
full All data, a more complete station model plot of station ID, temperature, dewpoint, sea level pressure, cloud cover, winds, present weather, visibility, pressure tendency (value+symbol), cloud ceiling (code),  low, medium, high cloud symbols comp
fullc Same as all except temperatures in celcius. comp
depict Weather depiction plot including flight rules (contoured), cloud cover, cloud ceiling and present weather. comp
wind A vector quantity of <uwndg,vwndg> vector
vect Wind vector plot vector
strm Streamline plot vector
pres Sea level pressure (mb) to 1 decimal place value
spres Station pressure (mb) to 1 decimal place value
alt Altimeter setting (in_Hg) to 2 decimal places value
lmhcd Composite plot of low, medium and high cloud types as symbols comp
ptend Pressure tendency (mb) value
ptype Pressure tendency trend as a symbol symbol
prec6 6 hour precipitation (in) to 2 decimal places value
prec12 12 hour precipitation (in) to 2 decimal places value
prec24 24 hour precipitation (in) to 2 decimal places value
maxt 24 hour maximum temperature (F) value
mint 24 hour minimum temperature (F) value
maxt6 6 hour maximum temperature (F) value
mint6 6 hour minimum temperature (F) value
fr Flight rules plotted as text (VFR, MVFR, IFR) text
mrat Mixing ratio (g/kg) to 1 decimal place value
shum Specific humidity (g/kg) to 1 decimal place value
conv Wind convergence (/s) positive is convergence grid
mconv Moisture convergence (/s) grid
rvort Relative vorticity (/s) grid
avort Absolute voriticty (/s) grid
tadv Temperature advection (K/s) grid
madv Moisture advection (/s) grid
vadv Vortcity advection (/s^2) grid

The program will now open the graphics window and start processing the data. The converted file is opened and data read in. A background map will be plotted first, Any additional computations are performed and the data are plotted. An overlay map will plotted if the plot type is color fill. If a simple plot is specified such as "temp", the data will be plotted to the nearest whole number unless formatted with the resrc:format resource. Composite plots can either be specified with the variable resource (.var file, resource file, command line). The resrc:variable resource allows the user to control much of the data formatting.

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.

Contour/Vector Plots

By default, this program plots data but it can produce grids that can either be contoured or plotted as vectors or streamlines. By specifying the resrc:plot_type resource to a contour or vector type, the program will generate gridded fields rather than plotting the data. The gridding process uses an objective analysis scheme to produce the grids. The parameters for this process are specified in the resrc:object_param resource. Once the grids have been created, 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 in much the same fashion as for the data plot.

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

For vectors:

Output Files

By default, this program does not produce output files. If a raw or grid file output is desired, use the resrc:output resource to enable this. By default, this will create a WXP binary 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 December 2013