WXP version 5
Program Reference

FOCALC

Sections

NAME

focalc - MOS data contouring program

SYNOPSIS

focalc [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default .wxpdef Sets the name of the resource file.
-na=name name focalc Specifies the name used in resource file parsing.
-ba batch No Run program in batch mode
-me=level message out2 Specifies level of messages to be displayed
  • file information - mess
  • gridding information - out3
-fp=filepath file_path current directory Specifies location of database files.  
-dp=datapath data_path current directory Specifies the location (path) of the input raw data files. This may be modified in the name convention file.
-cp=conpath con_path current directory Specifies the location (path) of the input converted data files. This may be modified in the name convention file.
-rp=rawpath raw_path current directory Specifies the location of the output raw files generated by the program. These files will not be generated unless the out_file resource is specified and the output is plotted data.
-gp=gridpath grid_path current directory Specifies the location of the output grid files generated by the program. These files are not generated unless the out_file resource is specified and the output is a gridded field.
-ip=imagepath image_path current directory Specifies the default location of the output GIF images generated by the program.
-nc=name_conv name_conv name_conv The name convention file specifies how files are named in WXP. This sets which name convention file to use.
-if=in_file in_file mos_dat Specifies the input file name tag. The default is mos_dat, 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...] out_file None Specifies what type of raw or grid file to create. By default, no output file is generated when the program is run. To produce an output file, this resource must be specified.  There are the following output file types:
  • wxp - WXP ASCII grid or raw file
  • wxpb - WXP binary grid file
  • raw - WXP ASCII raw file
  • cdf - NetCDF binary grid file

Second, the out_file resource specifies the output file name tag. The default is mos_raw or mos_grd but it can be modified to any value in the filename convention file. The file name tag can be specified separately or appended to the file type: wxp:mos_grd

A full filename can be specified which can contain name convention tags.

-pf=file_param file_param User prompt
Batch: use
This specifies how to treat output files that exist:
  • Use - use the existing file, don't overwrite. The program terminates when this occurs.
  • Over - overwrite the existing file
  • App - append the information onto the end of the existing file
  • Y - same as overwrite
  • N - same as use.
-cf=cityfile city_file mos.cty Specifies the name of the city database file used in finding station locations.
-mf=mapfile[,...] map_file wxp.map or
cont.dat, country.dat for domains outside North America
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|la] current None This specifies to use current data files. The current filename is based on the name convention. An optional hour can be specified for older data. If la is specified, the program will search back to find the most recent available file.
-ho=hour hour None This resource specifies the exact hour that a data file is valid for. This locks in the start hour for a multi-file sequence.
-mo=model model ngm Specifies the model to use as input data.
  • ngm -- Use Nested Grid Model (NGM) MOS data (FOUS14) (DEFAULT),
  • mrfx -- Use Medium Range Forecast (MRF) MOS data (FOX),
  • ngm_ua -- Use upper air NGM MOS (FOUE,M,W60-78)
  • eta_ua -- Use upper air ETA MOS (FOUS60-78)
-id=identifier identifier None Used to plot a specific observation. If not specified, all stations will be plotted.
-pd=domain plot_domain User prompt
Batch: first domain in wxp.reg file.
This specifies the plotting domain. The projection, aspect ratio and the domain size are specified.
-gd=grid_domain grid_domain Same as plot domain This specifies the domain to use when fitting data to a grid. If this is not specified, it is the plot_domain.
-re=region region Same as plot domain This resource is synonymous with the plot_domain.
-pr=prior stat_prior Depends on domain size This specifies the lowest priority to use in the plot. Priorities range from 1 to 7.
-ft=time time User prompt
Batch: initial time
This specifies the forecast time to be used in the plots. To create loops, a list of forecast time are specified separated by commas.
-va=variable variable User prompt
Batch: first variable listed in the sfcwx.var file
This specifies the variable to plot along with its formatting attributes. Multiple variables can be specified separated by commas for overlay plots. A list of valid variables is given below.
-oa=smooth[,radinf] [,passes] [,converg] [,min_sta] object_param 1,3,1,.2,1 Specifies the objective analysis parameters. There are 5 parameters including smoothing, radius of influence, number of passes, convergence parameter and minimum number of stations.
-pl=plot_type plot_type Data Plot
User prompt if plotting grids
Batch: fill contours or vectors
Specifies the type of output plot. By default, this is a simple data plot. To produce a contour or vector plot, use the following plot types:

Contours:

  • cf -- color fill contours
  • ln -- line contours
  • dln -- dashed line contours
  • ndln -- negative dash line contours
  • lcf -- both line and color fill contours
  • gvalue -- plot gridpoint values

Vectors:

  • vect -- vectors/arrows
  • strm -- streamlines
  • barb -- wind barbs
  • none -- for no output plot
-sc=scale_factor plot_scale 1.0 Specifies a scaling factor for all plotted text, symbols, vectors, etc.
-fm=format plot_format None Specifies the output format of the plots.  This is generally used to specify how many decimal places get displayed on the plot and in the output raw files.
-pp=param[,param...] plot_param None Specifies additional plotting parameters. See the plot_param resource for more details.
-dr=drawable[,...] draw all Specifies which part of the plot is to be drawn.
-la=label[,...] 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.
-in=interval con_interval None for plots, User prompt for grids. Batch: 0 Specifies the contour interval to use in contouring grids. This can also be used to color code plotted data and vectors.
-cb=base con_base Lowest contour value, maximum wind speed Specifies the base value for color fill contours, and wind speed per grid distance. For more details, see the con_base resource.
-fl=font_list 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.
-cot=color[:attr] color_text white
black
for inverse plots.
Specifies the text color for labels above and below the plot.
-cod=color[:attr] color_data green Specifies the color for plotted data.
-com=color[:attr] color_map red Specifies the color for background maps.
-coln=color[:attr] color_line magenta:st=dsh Specifies the color for lat/lon lines.
-cowd=color[:attr] color_wind white
black
for inverse plots.
Specifies the color for wind barbs.
-cocd=color[:attr] color_cloud white
black
for inverse plots.
Specifies the color for cloud cover symbols.
-cowx=color[:attr] color_wx yellow
brown for inverse plots
Specifies the color for weather symbols
-copp=color[:attr],... color_pop yellow
brown for inverse plots
Specifies the colors for probability of precipitation.
-cocm=color[:attr] color_cmap black Specifies the color for color fill contour maps.
-coco=color[:attr] color_cont white
black
for inverse plots.
Specifies the color for line contours.
-cof=[val:]color[:attr],... color_fill A predefined color set based on the wxp.clr color table Specifies the color fill contour color set. See the color_fill resource for more details.
-cola=color[:attr] color_label white
black
for inverse plots.
Specifies the line contour label color.
-cocl=color[:attr] color_clabel black Specifies the color fill contour label color.
-de=device[,...] device User prompt
Batch: display
Specifies the output device.
-ti=title title Program name Specifies the window title.
-ic icon Off Specifies whether to open window in iconified mode.
-bg=color background black
white for inverse plots
Specifies the background color of the window.
-ge=geometry geometry 640x480 Specifies the window and paper geometry.
filename[#seq] filename None
User Pompt
Batch: current=la
The name of the MOS data file to be plotted. An optional sequence number can be added to designate the time for non-WXP files.

DESCRIPTION

This program contours MOS (Model Output Statistics) data on a background map. The input to the program is a raw ingested MOS data file. This is different from other WXP plotting programs in that MOS data is regularly formatted so a decode/conversion process is not necessary.  Then, based on a plot domain, forecast time and a variable selected by the user, a 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 4 different model sources:

  1. NGM - MOS statistical forecast data derived from the NGM model.   This includes many parameters such as max/min temperature, 3 hourly estimates of temperature, dewpoint, precipitation, winds, etc.
  2. NGM_UA - This is derived directly from the NGM model grids and represent data such as boundary layer temperature, relative humidity, sea level pressure, lifted index, 1000-500 mb thickness and vertical velocity.
  3. ETA_UA - This is very similar to the NGM_UA except the data are from the ETA model.  This includes lowest level temperatures, relative humidity, sea level pressure, lifted index, 1000-500 mb thickness and vertical velocity.
  4. MRFX - This is derived extended range forecast data taken from the MRF model run once a day. The data include max/min temperature, probability of precipitation, winds, and cloud coverage reported once every 12 hours.

The model type can be changed with the model resource.

The plot domain defaults to the contiguous US unless changed through the plot_domain resource. The domain can be interactively changed using the mouse once the plot has been generated.

The programs starts off by prompting the user for input MOS file name.  For some ingestors, such as the LDM, the list may contain many files that don't contain plottable MOS data.  Only the 0 and 12Z data files are usable. The user may specify the input file either via the command line of through the current resource. The input naming convention is specified by the mos_dat tag but this can be changed with the in_file resource.

NOTE: The program assumes that the model data for all model types are contained in a single file type represented by the mos_dat tag. If the model types are in different files, the tag must be specified in the in_file resource. Both model and tag can be specified simultaneously if the model type is contained in the tag.  For example, using mos_ngm_ua for the tag for NGM_UA data.  The program will see the "ngm_ua" in the tag and use that model type.

Next, the program prompts the user for the forecast time. This is done through a forecast time menu which is specified in the focalc.tim file. Remember, each model type has a specific set of valid forecast times.

After the forecast time has been set, the city database is read in and a cross-reference table is setup. Since MOS data does not have location information, the program will refer to this table to location each station in the input file.

The program will now prompt the user for the particular output variable to plot. The program will show a menu of commonly used variables but many more are defined internally by the program and in the focalc.var file. The internal variables are

Internal Variables (NGM)
Variable Description and units Plots
city All stations in the data file text
temp Temperature (F) value
dewp Dewpoint (F) value
dewd Dewpoint depression (F) value
wdir Wind direction (deg) value
wspd Wind speed (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
pop
pop6
6 hour probability of precipitation (%) value
pop12 12 hour probability of precipitation (%) value
pot
pot6
6 hour probability of thunderstorms (%) value
pot12 12 hour probability of thunderstorms (%) value
post
post6
6 hour probability of severe thunderstorms (%) value
post12 12 hour probability of severe thunderstorms (%) value
ptype Precipitation type (number from MOS record) value
obvis Obscuration to visibility (number from MOS record) value
wx
wx6
Present weather based on 6 hour forecast data (SAO string) text
wx12 Present weather based on 12 hour forecast data (SAO string) text
vis Visibility (mi) value
cldcl Cloud ceiling (100 ft) value
cldcv Cloud cover (cloud string) value
extt Extreme temperature (F) uses maximum or minimum value
maxt Maximum temperature (F) not always available value
mint Minimum temperature (F) not always available value
prec
prec6
6 hour precipitation total (in) value
prec12 12 hour precipitation total (in) value
snwfl
snwfl6
6 hour snowfall total (in) value
snwfl12 12 hour snowfall total (in) value
vpres 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
rhum Relative humidity (%) value
fr Flight rules value, text
0=VFR, 1=MVFR, 2=IFR

 

Internal Variables (MRF)
Variable Description and units Plots
city All stations in the data file text
temp
maxt
Maximum temperature (F) value
nmaxt Normal maximum temperature (F) value
mint Minimum temperature (F) value
dmint Normal minimum temperature (F) value
wspd Wind speed (knt) 00 and 12 Z value (specified with time resource) value
pop12 12 hour probability of precipitation (%) 00 and 12 Z value (specified with time resource) value
pop
pop24
24 hour probability of precipitation (%) value
pos 12 hour probability of snow (%) 00 and 12 Z value (specified with time resource) value
wx Present weather (SAO string) text
cldcv Cloud cover (%) 00 and 12 Z value (specified with time resource) value

 

Internal Variables (UA)
Variable Description and units Plots
city All stations in the data file text
temp Lowest level temperature (C) value
tempb Boundary layer temp (C) value
temp1 Level 1 temperature (C) value
temp2 Level 2 temperature (C) value
temp3 Level 3 temperature (C) value
wdir Wind direction (deg) value
wspd Wind speed (knt) value
wbrbc
wbrb
wind
Wind speed and direction (knt) value
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
pres Sea level pressure (mb) value
prec Precipitation (in) use time variable to get accumulated totals value
cprec 48 hour cumulative precipitation (in) value
rhum Lowest level relative humidity (%) value
mrhum Mean boundary layer relative humidity (%) value
rhum1 Level 1 relative humidity (%) value
rhum2 Level 2 relative humidity (%) value
rhum3 Level 3 relative humidity (%) value
vvel 700 mb vertical velocity (-ub/s) value
lift Lifted index (dC) value
thick 1000-500 mb thickness (m) value

These parameters can be accessed by name if they have not been redefined in the focalc.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 focalc.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 (UL), dewpoint (LL), 6 hour probability of precipitation (yellow-UR), cloud cover, winds and present weather. comp
cli Climatic data, a composite plot of extreme temperature (UL), 12 hour POP (yellow-UR), cloud cover, winds and present weather. comp
allm All data for MRF, a composite plot of max (UL) and min (LL) temperature, 24 hour POP (yellow-UR), cloud cover, present weather 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
conv Wind convergence (/s) positive is convergence value
mconv Moisture convergence (/s) value
rvort Relative vorticity (/s) value
avort Absolute vorticity (/s) value
tadv Temperature advection (K/s) value
madv Moisture advection (/s) value
vadv Vorticity advection (/s^2) value

The program will now open the graphics window and start processing the data. The user will be prompted for the output device. Then the data file is opened and data read in. Any additional computations are performed to produce a derived variable and fit the data to a grid. The background map will plot first unless the output is a color fill contour in which the map plots last. The gridding process uses an objective analysis scheme to produce the grids. The parameters for this process are specified in the 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.

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.

Present Weather Determination

The estimated type of weather on NGM plots is based on the following information:

  1. Precipitation based on probability of precipitation > 30%,
  2. Precipitation type based on PTYPE field (rain, snow, freezing rain),
  3. Precipitation intensity based on quantitative precipitation QPF field (see below),
  4. Existence of thunderstorms based on probability of thunderstorm > 20%,
  5. Existence of severe thunderstorms based on severe thunderstorm probability > 30%,
  6. Existence of obscuration (fog/haze) based on VIS field < 1 mile where obscuration type determined by OBVIS field.

Precipitation type and intensity based on 6 hour information

Type 1 2 3 4 5
Rain R- R- R- R R+
Freezing ZR- ZR- ZR ZR+ ZR+
Snow S- S- S S+ S+

Precipitation type and intensity based on 12 hour information

Type 1 2 3 4 5 6
Rain R- R- R- R- R R+
Freezing ZR- ZR- ZR- ZR ZR+ ZR+
Snow S- S- S- S S+ S+

EXAMPLES

   focalc -cu=la -ft=h24 -va=extt -de=d -pl=cf -in=2

This contours the extreme temperature for the US in color fills with an interval of 2.

   focalc -cu=la -ft=h24 -va=temp -of=wxp -pl=none

This will generate grid file based on the mos_grd name convention.  A specific filename can be used instead of wxp.

   focalc -mo=mrfx -cu=la -ft=d4 -va=maxt

This contours maximum temperatures from the MRF MOS.

FILES

SEE ALSO


Last updated June 10, 1998