WXP
Program Reference

sfcdec

Sections

NAME

sfcdec - Surface decoder (METAR, SAO, Synop)

SYNOPSIS

sfcdec [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 sfcdec Specifies the name used in resource file parsing.
-me=level message out2 Specifies level of messages to be displayed
  • file information - mess
  • decoded output -out3
  • raw data and format - out4
-fp=path file_path the current directory Specifies location of database files.
-dp=path data_path the current directory Specifies location of input raw data files.
-cp=path con_path the current directory Specifies location of output decoded data files.
-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.
-tp=path text_path the current directory Specifies location of raw ingest text data
-mp=path model_path the current directory Specifies location of raw model GRIB data
-sp=path sat_path the current directory Specifies location of satellite images.
-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.
-in=input input program specific Specifies the type of the input data.
-ou=output output wxp Specifies what type of output file is to be created:

  • wxp - WXP ASCII file
  • xml - WXP XML file
  • cdf - NetCDF file
-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
-pa=param[,param...] parameter none Extra parameters:
  • app - append mode, new reports appended to end of file
  • metar - decode METAR reports
  • sa - decode old style SA reports
  • synop - decode SYNOP reports
  • ship - decode SHIP reports
  • buoy - decode BUOY reports
  • dribu - decode DRIBU reports
  • cman - decode CMAN reports
  • range:pre:post - specifies time range for valid data.(default: -15:4)
  • update - one report per site, updating information from duplications/corrections (default).
  • all - save all valid reports including duplications/corrections.
filename (positional) filename none Specify input filename

DESCRIPTION

The intent of the surface data conversion process is to combine all the surface data (SAO, METAR, SYNOP, SHIP, BUOY, DRIBU, CMAN) into one format so that a single program can process or plot all the data. All stations for a particular report time are decoded and put into an output converted data file.

The sfcdec program will determine the input filename from the in_file and current resource. This file should contain surface observations in any of the formats listed above. Typically, these files are split on hourly boundaries since observations are reported at least once an hour. The resrc:current resource along with the resrc:out_file resource determines the decode time which sets up the output filename. The input file tag (resrc:in_file) is by default sfc_dat. This will determine the input files. The program program will only decode one input filename unless the resrc:num_hour resource is specified. If the input data for a specific time spans several files, use the range feature in the num_hour resource to specify this. For example, to decode the two previous hours data files plus the following one, specify "-nh=-2-1".

The valid time range for data is from 15 before the hour to 4 minutes after the hour. Only regular reports (not specials) during that time are saved. This can be changed with the "range" parameter.

The raw observation data are parsed for individual reports which are then passed through the various decode modules for each type of data. Once decoded, the output is saved to the output file. By default, only one report per station is saved to the output file. This will remove duplicates and apply any corrections to the observation. If the "all" option is specified, all reports will be saved including duplicates. This is only for debugging since plotting this data would show multiple possibly different reports for each station.

The sfcdec program will not show decoded output while decoding. If this is desired, set the message level to "out3". This will show a tabular output of decoded data: displayed to the screen as an attempt to speed up the conversion process. Decoded output can be displayed is the out3a message level is set:

 Decoding for: 2011/08/30 06:MM:MM
ID     TIME   T  TD  RH DIR SPD GST ALT SLP VIS CIL  COV WX  MAX MIN  PR6 PR24 SC
Decoded file: ../../tmp/11083006_sao.wxp
Processing: /data/nwstg/data/11083006_sao.wmo
CYVM   0543   3   3 100 190   7     967       9  52  OVC R-
CYUX   0543   2  -0  87 290   9  15 968       9  17  BKN -
OEDM   0500  35   3  13 150   7     986      10      CLR
MGGT   0600  18  18 100 180   4     019          15  BKN R-
CYKJ   0544  16         180   6     969       8  55  OVC R+
CYKJ   0545  15  10  72 180   8     969 063   7  60  OVC R
CYSF   0545  12  12 100  90  14  19 964 047   5  11  OVC R
CWEF   0540  18  13  71 260  30  36     122
SBBV   0600  26  21  74  30   2     986          20  SCT        

If the raw input needs to be displayed, set the message level to out4:

ID     TIME   T  TD  RH DIR SPD GST ALT SLP VIS CIL  COV WX  MAX MIN  PR6 PR24 SC
Decoded file: ../../tmp/11083006_sao.wxp
Processing: /data/nwstg/data/11083006_sao.wmo
CYVM:SP:CN:SPECI CYVM 300543Z AUTO 19007KT 9SM -RA OVC052 03/03 A2967
CYVM   0543   3   3 100 190   7     967       9  52  OVC R-
CYUX:SP:CN:SPECI CYUX 300543Z AUTO 29009G15KT 9SM -UP BKN017 02/M00 A2968
CYUX   0543   2  -0  87 290   9  15 968       9  17  BKN -
OEDM:ME:XX:METAR OEDM 300500Z 15007KT CAVOK 35/03 Q1011
OEDM   0500  35   3  13 150   7     986      10      CLR
MGGT:ME:XX:METAR MGGT 300600Z 18004KT 9999 -RA BKN015 BKN090 18/18 Q1022 A3018
MGGT   0600  18  18 100 180   4     019          15  BKN R-
CYKJ:SP:CN:SPECI CYKJ 300544Z AUTO 18006KT 160V230 8SM +RA BKN055 OVC074 16/  A2969 RMK PRESRR PCPN 0.8MM PAST HR MAX WND 16019KT AT 0517Z
CYKJ  0544  16         180   6     969       8  55  OVC R+                    

The raw data shows the station ID, the type of data (ME=METAR, SP=SPECI, sa=SAO, sp=SAO SP, SY=SYNOP, SH=SHIP, BU=BUOY, DR=DRIBU, CM=CMAN), the location (US, CN, MX or XX) and the actual data.

There are three types of output data file types available. The ASCII WXP flat file, the WXP XML file, and a netCDF output. Information on each of these formats can be seen in the File Reference.

EXAMPLES

FILES

SEE ALSO


Last updated October 2013