WXP version 5
Program Reference

SA_PARSE

Sections

NAME

sa_parse - Surface data display program

SYNOPSIS

sa_parse [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 sa_parse 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
-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 surface converted data files. This may be modified in the name convention file.
-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 sfc_dat Specifies the input file name tag. The default is sfc_dat, but it can be modified to any value in the filename convention file. A full name convention can be specified as well.

If the input type is "cvt", the program will use converted data.  The input name tag will then be sfc_cvt unless otherwise specified.

-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.
-nh=num_hour num_hour 0 This specifies the number of hours that will be used. If this is not specified, a single hour will be parse.  Otherwise a set of hours will be parsed.
-cf=cityfile city_file sao.cty Specifies the name of the city database file used in finding station locations.
-pd=domain plot_domain Not set. All stations used. This specifies the plotting domain for station filtering. The projection, aspect ratio and the domain size are specified.
-re=region region Same as plot domain This resource is synonymous with the plot_domain.
-pr=prior stat_prior Not set. All stations used. This specifies the lowest priority to use in station filtering. Priorities range from 1 to 7.
-id=identifier identifier User prompt Specifies the station to use in the program. A list of stations separated by commas can be specified. To get all stations, use the keyword "all".

Also, using keywords will parse for more than just specific stations.  This requires the city file to be read so use the "city" parameter.   For example,  "st=state" will parse for all stations within a state. This uses the sao.cty file to search for IDs within a state.

-pa=param parameter None Specifies additional plotting parameters. See the parameter resource for more details. Some possibilities are:
  • dec -- decode raw surface data prior to output
  • raw -- print raw undecoded surface data
  • pln -- single line output for decoded printout
  • plns -- double line output for decoded printout (default)
  • psyn -- use simple synoptic format for decoded printout
  • psimp -- single line output for general use
  • pfull -- multiline output for decoded printout
  • pvar -- uses variable resource to create table of station data
  • blank -- display stations not reporting
  • city -- use a city database to sort station data into a particular order
  • cvt -- parse a decoded file rather than a raw file
  • header-1 -- print a column header only once
  • header-e -- print a column header for every station
filename[#seq] filename None
User Pompt
Batch: current=la
The name of the surface data file to be used. An optional sequence number can be added to designate the time for non-WXP files.

DESCRIPTION

This program displays surface data in a tabular format. The input to the program is either a raw ingested surface data file or a converted surface data file produced by the sacvt program.

The programs starts off by prompting the user for input data file name.  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 sfc_dat tag (or sfc_cvt if "cvt" data is requested) but this can be changed with the in_file resource.

Next, the user enters a station identifier. The stations are entered by their 3/4 letter IDs. Once the station is selected, the program prints out surface data.

Text Output

There are 4 formats for surface data output:

Column headings include:

Printing using Variable Interface

If the print type is set to pvar, the variable resource is used to determine which variables will be printed in the table.  There is a sa_parse.var file for setting up complicated tables and simplifying program use.  The possible formatting includes the units and output C format (wetblb:F:%.1f).   Also, time can be specified for use with precipitation (anal-6acc::prec::%.2f).   The data is displayed in 7 character wide columns.  The output for "city,temp,dewp,rhum,wetblb:F:%.1f" would look like:

  city   temp   dewp   rhum wetblb
                                 F
KTHV       83     66     57   71.1
KIPT       85     64     50   70.4
KAGC       84     61     45   68.4
KPIT       82     61     49   67.9
KPHL       84     73     70   76.0
KFKL       81     61     51   67.4
KERI       82     65     56   70.2
KAFJ       82     61     48   67.9
KSEG       85     63     48   69.9      
...

Here is a list of the possible variables:

Internal Variables
Variable Description and units
city or id Station ID
otime Observation time
temp Temperature (F)
dewp Dewpoint (F)
dewd Dewpoint depression (F)
wdir Wind direction (deg)
wspd Wind speed (knt)
wgst Wind gust (knt)
alt Altimeter setting (in_Hg)
pres Sea level pressure (mb) use level parameter to get station/surface pressure
pralt Sea level pressure or altmeter setting if sea level pressure is missing (mb)
elev Station elevation (m)
wx Present weather (string)
vis Visibility (mi)
cldcl Cloud ceiling (100 ft)
cldcv Cloud cover (cloud string)
ptend Pressure tendency (mb, trend is a string)
prec Precipitation (in) use time parameter to specify which type (3,6,12,24 hour)
extt Extreme temperature (F) uses maximum if available, else minimum.
Use time parameter to specify which type (6,24 hour)
maxt Maxmium temperature (F) use time parameter to specify which type (6,24 hour)
mint Minimum temperature (F) use time parameter to specify which type (6,24 hour)
snwdp Snow depth (in)
lcld Low cloud type (string)
mcld Middle cloud type (string)
hcld High cloud type (string)
solar Equivalent solar radiation (min)
sst Sea surface temperature (C)
wavper Wave period (sec)
wavhgt Wave height (m)
vpres Vapor pressure (mb)
svpres Saturation vapor pressure (mb)
wchilt Wind chill temperature (K)
wchilf Wind chill factor (W/m^2)
heat Heat index (K)
humit Humiture (F)
mrat Mixing ratio (g/kg)
smrat Saturation mixing ration (g/kg)
shum Specific humidity (g/kg)
rhum Relative humidity (%)
wetblb Wetbulb temperature (K)
thetaw Wetbulb potential temperture (K)
thetae Equivalent potential temperature (K)
thetav Virtual potential temperture (K)
theta Potential temperature (K)
vtemp Virtual temperature (K)
fr Flight rules (number and string: 0=VFR, 1=MVFR, 2=IFR)

EXAMPLES

   sa_parse -cu=la -id=KIND
   KIND 020756Z 11003KT 9SM CLR 06/06 A3013 RMK AO2 SLP203 T00560056      $  

This displays surface data for KIND.

   sa_parse -cu=la -id=KIND -if=cvt
   ID   TIME   T  TD  RH DIR SPD GST ALT SLP VIS CIL COV WX  MAX MIN  PR6 PR24 SC
   KIND 0756  42  42 100 110   3     013 203   9     CLR 

This displays a user specified list of variables:

   sa_parse -cu=la -if=cvt -id=ST=PA -pa=city,pvar \
      -va=city,temp,dewp,rhum,wetblb:F:%.1f 
     city   temp   dewp   rhum wetblb
                                 F
   KTHV       83     66     57   71.1
   KIPT       85     64     50   70.4
   KAGC       84     61     45   68.4
   KPIT       82     61     49   67.9
   KPHL       84     73     70   76.0
   KFKL       81     61     51   67.4
   KERI       82     65     56   70.2
   KAFJ       82     61     48   67.9
   KSEG       85     63     48   69.9      
   ...

FILES

SEE ALSO


Last updated July 28, 1998