WXP version 5
Program Reference

SHEFCVT

Sections

NAME

shefcvt - SHEF data conversion program

SYNOPSIS

shefcvt [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 shefcvt 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
  • decoded output -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 is the location where the ingest program has saved the data files. This may be modified in the name convention file.
-rp=rawpath raw_path current directory Specifies the location (path) of the output raw 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 shef_dat Specifies the input file name tag. The default is shef_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 shef_raw The out_file resource specifies the output file name tag. The default is shef_raw but it can be modified to any value in the filename convention file. A full name convention can be specified as well.
-pf=file_param file_param User prompt
Batch: use
This specifies how to treat 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.
-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.
-pa=param[,param...] parameter None Extra parameters:
  • date:date - puts this date in output raw file
filename[#seq] filename None
User Pompt
Batch: current=la
The name of the raw data file to be converted. An optional sequence number can be added to designate the time for non-WXP files.

DESCRIPTION

The SHEF decoding program will search for and decode SHEF reports from SRUS products. The decoder takes SHEF data which is essentially tagged numbers and converts it to a raw file format which is compatible the WXP.  A sample of SHEF data are:

** SRUS23 KTOP 272358 ***
SRUS23 KTOP 272358
FSD
.A HLTK1 1227 C DH18/TA 17/TX 36/TN 17


** SRUS51 KWBC 280001 ***
SRUS51 KWBC 280001
^NMCRRATX3
: && HADS TPR REPORT TPR3 FOR LBB 
.B NMC 1228 DH0001/PCIRG/PPKRG/HGIRG/HPIRG
EART2 DD272330/16.59/ .00//
KNBT2 DD272130/12.00/ .00/2.85/
NLKT2 DD272130/9.74/ .00//
TKLT2 DD272330/10.33/ .00/4.23/
BILT2 DD272130/7.81/ .00//
STST2 DD272130/12.93/ .00//
BCPT2 DD272130/12.41/ .00//
MMCT2 DD272121/10.14/ .00/ .01/
TKST2 DD272130/16.03/ .00/6.66/
TBRT2 DD272130/12.81/ .00//1928.99
.END


** SRUS53 KWBC 280001 ***
SRUS53 KWBC 280001
^NMCRRAMN 
: && HADS TPR REPORT TPR1 FOR MSP 
.B NMC 1228 DH0001/HGIRG/PPKRG/TAIRG/HPIRG/HTIRG/PCIRG
ATKM5 DD2721/7.60/////
RKFM5 DD2722/5.30/////
ANKM5 DD2723/7.64/////
SSPM5 DD2722/87.01/////
GTBW3 DD2723/4.75/////
SCFW3 DD2722/2.18/////

These data are decoded into a raw file with a name based on the shef_raw name convention. The output raw file from the above data would be:

WXPRAW
 0Z 28 DEC 93
SHEF Data
HLTK1 TA:17 TX:36 TN:17
EART2 PCIRG:16.59 PPKRG:.00
KNBT2 PCIRG:12.00 PPKRG:.00 HGIRG:2.85
NLKT2 PCIRG:9.74 PPKRG:.00
TKLT2 PCIRG:10.33 PPKRG:.00 HGIRG:4.23
BILT2 PCIRG:7.81 PPKRG:.00
STST2 PCIRG:12.93 PPKRG:.00
BCPT2 PCIRG:12.41 PPKRG:.00
MMCT2 PCIRG:10.14 PPKRG:.00 HGIRG:.01
TKST2 PCIRG:16.03 PPKRG:.00 HGIRG:6.66
TBRT2 PCIRG:12.81 PPKRG:.00 HPIRG:1928.99
ATKM5 HGIRG:7.60
RKFM5 HGIRG:5.30
ANKM5 HGIRG:7.64
SSPM5 HGIRG:87.01
GTBW3 HGIRG:4.75
SCFW3 HGIRG:2.18

As can be seen, the column headings on the .B reports and data descriptors on the .A reports become prefixes on the data saved to the raw file. Individual data types can be extracted by using either mapplt or rawmath.

If the message level is set to out3, some decoded information is printed to the screen:

SHEFA .A HLTK1 1227 C DH18/TA 17/TX 36/TN 17
ID: HLTK1
  DATE: 1227
  ZONE: C
  TIME: H 18
  TA-Temperature: 17 F
  TX-Maximum temperature: 36 F
  TN-Minimum temperature: 17 F
SHEFB .B NMC 1228 DH0001/PCIRG/PPKRG/HGIRG/HPIRG
ID: NMC
  DATE: 1228
  TIME: H 0001
  TYPE: PCIRG
  TYPE: PPKRG
  TYPE: HGIRG
  TYPE: HPIRG
ID: EART2
  TIME: D 272330
  PCIRG-Precipitation accumulated: 16.59 in
  PARAM: PPKRG .00
ID: KNBT2
  TIME: D 272130
  PCIRG-Precipitation accumulated: 12.00 in
  PARAM: PPKRG .00
  HGIRG-River stage: 2.85 ft
ID: NLKT2
  TIME: D 272130
  PCIRG-Precipitation accumulated: 9.74 in
  PARAM: PPKRG .00
ID: TKLT2
  TIME: D 272330
  PCIRG-Precipitation accumulated: 10.33 in
  PARAM: PPKRG .00
  HGIRG-River stage: 4.23 ft

EXAMPLES

   shefcvt -cu=la

will convert the latest SHEF file and create a raw file.

To plot SHEF data, mapplt is set up so that it can pick a variable and display it.

   mapplt -if=12112296.shef-HGIRG -re=40,-86,.3 -cf=shef.cty \
     -mf=state.map,ind_cnty.map

Also rawmath can extract a field from the raw file.

   rawmath ext 12112296.shef-HGIRG = - -fm=5.2

Would yield a file such as:

   WXPRAW
   12Z 22 NOV 96
   SHEF Data-HGIRG
   KNBT2  2.72
   TKLT2  6.17
   MMCT2  0.01
   TKST2  6.61
   ATKM5  7.17
   RKFM5  4.73
   ANKM5  4.38
   ...

Rawmath has the capability of creating time series of SHEF data. For example, rawmath could be used to create a new raw file with:

   rawmath series 12111996.shef-HGIRG:NOV19 12112096.shef-HGIRG:NOV20 \
     12112196.shef-HGIRG:NOV21 12112296.shef-HGIRG:NOV22 = - -id=LAFI3 \
     -fm=5.2 "SHEF-HGIRG for LAFI3"

Would yield:

   WXPRAW
   12Z 19 NOV 93
   SHEF-HGIRG
   NOV19 15.43
   NOV20 13.75
   NOV21 11.05
   NOV22  9.39

The mapplt program will create a time-value plot:

   rawmath series 12111996.shef-HGIRG:NOV19 \
                  12112096.shef-HGIRG:NOV20 \
                  12112196.shef-HGIRG:NOV21 \
                  12112296.shef-HGIRG:NOV22 = - \
     -id=LAFI3 -fm=4.2 "SHEF-HGIRG for LAFI3" | \
   mapplt -pd=cat,0,5,2,2,3,15 -if=std \
     -pp=line,mark:1,lalo:1:1 -de=d

This uses the series function to extract HGIRG data from the SHEF raw files. This is labeled by day for the station LAFI3.

FILES

SEE ALSO


Last updated Sept 26, 1997