Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

SACVT

Sections

NAME

sacvt - Surface METAR/SAO data conversion program

SYNOPSIS

sacvt [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 sacvt 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 -out3a
  • raw data and format - out3c
  • not in database - out3c
  • remark decode status - out4c
-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.
-cp=conpath con_path current directory Specifies the location (path) of the output 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.
-ou=output output wxp

Specifies what type of output file is to be created:

  • wxp - WXP ASCII converted file. Name convention set to sfc_cvt_wxp.
  • cdf - NetCDF binary converted file. Name convention set to sfc_cvt_cdf.
-of=out_file out_file sfc_cvt The out_file resource specifies the output file name tag. The default is sfc_cvt but it can be modified to any value in the filename convention file. A full name convention can be specified as well.

Also, can specify what type of output file is to be created:

  • wxp - WXP ASCII converted file
  • cdf - NetCDF binary converted file
-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.
-cf=cityfile city_file None Specifies the name of the city database file used in finding station locations.
-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 searched for hourly data.
-dh=decode_hour decode_hour None Specifies a specific decode time when using more than one file.
-id=identifier identifier None Used to decode a specific observation.If not specified, all stations will be decoded.
-pa=param[,param...] parameter None Extra parameters:
  • time - print the time in the output file. (default)
  • no_loc - no location in the input file, use city database.
  • spec - save specials to output file (default)
  • nospec - does not save specials.
  • pln - print single line report
  • plns - print the 2 line report
  • psyn - print using synoptic print format.
  • pfull - print using the full multiline report
  • range:pre:post - specifies time range for valid data.(default: -15:10)
  • all - save all data to output file.
  • dup - remove duplicate reports prior to saving to file
  • update - remove duplicates and update existing reports with corrections.
filename[#seq]
[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.  More than one file can be specified. 

DESCRIPTION

The intent of the surface data conversion process is to combine all the surface data (SAO, METAR, Synopt, Buoy, Dribu, CMAN) into one format so that a single program can plot all the data.  The surface conversion process is split up into two programs sacvt (METAR/SAO) and smcvt (Synoptic, Buoy, CMAN).  sacvt program handles hourly data in either METAR or SAO formats. All stations for a particular report time are decoded and put into an output converted data file.

The sacvt program will first prompt the user for the input raw data file. This file should contain the METAR and SAO reports for a given time. It is recommended that these files be split up on hourly boundaries since this type of data is reported once an hour. 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 but this can be changed with the in_file resource.  If the data stretches over an hour, the num_hour resource can be specified to search over multiple files.

Once the input file is determined, the program determines the decode time from the filename specified or that of the current resource. If decode time is different from that of the specified file, the decode_hour resource must be specified. For example, if the decode time is 12Z and the range of files is from 10-14Z, the current hour would be 14Z, the number of hours would be -4 and the decode hour would be 12. This resource can also be used to set decode time range limits which is useful if decoding data from off times such as :20 after the hour. Once the decode time is set, the output converted file is opened for output. The name convention is determined from the syn_cvt file convention tag. If the converted file exists, the user will be prompted whether to overwrite, append or use the existing file. The append option leaves the current data in the converted file and adds the new station data onto the end of the file. If the use option is specified, the converted file is not modified and the surface data conversion program exits.

The data are parsed for individual station reports which are then passed through the METAR/SAO decode module. Once decoded, the output is saved to the output converted file in the order they were decoded. This is not true is the dup or update options are specified. The remove duplicate (dup) option removes duplicate reports from the output converted file. The update station (update) option not only removes duplicate stations but updates station data with corrections and amendments.

The conversion process is silent. By default, none of the output is 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:

ID   TIME   T  TD  RH DIR SPD GST ALT SLP VIS CIL COV WX  MAX MIN  PR6 PR24 SC
Processing file: /rainbow/data/ddplus/03060797.sao
KLNP 0240  52  43  71 150   4     002      10     CLR
K4BK 2347  69  52  54 310  10         114  30     CLR      72  59
CYZY 0243  50  43  76 230   7  21 976       9  38 FEW
PABA 0235  36  32  86 100  11     975      10     CLR
KBIV 0242  59  59 100 130   6     995       5  15 SCT R-
KCAE 0242  61  55  82  20   8     995      10  23 OVC
PACV 0241  50  50 100 160   6     965 041   5   8 OVC R-
KPSX 0240  79  72  79 150  10     978       7 200 OVC
KJAX 0243  64  61  88 350   6     986      10  12 OVC
KCRP 0243  73  66  78 310  12  18 977      10  19 OVC TR-
 WRA 0243  37  36  93  40  22         182             M
 WEF 0242  39  39 100      14         212             M
CYQX 0242              10   8             0.8   2 OVC
 WAF 0200  45  41  87  30   5                         M
 WRA 0243  37  36  93  40  22         182             M     

If the raw information is to be displayed, use the out3 message level:

ID   TIME   T  TD  RH DIR SPD GST ALT SLP VIS CIL COV WX  MAX MIN  PR6 PR24 SC
Processing file: /rainbow/data/ddplus/03060797.sao
0:2:243:KLNP:KLNP 070240Z AUTO 15004KT 10SM CLR 11/06 A3002 RMK AO1
KLNP 0240  52  43  71 150   4     002      10     CLR
0:2:0:K4BK:K4BK 062347Z COR 31010KT 30SM SKC 21/11 RMK SLP114 NOSPECI      T0207
0111 10223 20152 57010
K4BK 2347  69  52  54 310  10         114  30     CLR      72  59
1:5:243:CYZY:SPECI CYZY 070243Z AUTO 23007G21KT 9SM FEW038 FEW048 FEW057 10/06 A
2976 RMK PRESRR
CYZY 0243  50  43  76 230   7  21 976       9  38 FEW
0:5:243:PABA:PABA 070235Z AUTO 10011KT 10SM CLR 02/00 A2975 RMK AO1      T002200
01
PABA 0235  36  32  86 100  11     975      10     CLR
0:5:243:KBIV:KBIV 070242Z AUTO 13006KT 5SM -RA BR SCT015 15/15 A2995 RMK AO2
  P0002 TSNO
KBIV 0242  59  59 100 130   6     995       5  15 SCT R-
0:5:243:KCAE:KCAE 070242Z 02008KT 10SM BKN023 OVC031 16/13 A2995 RMK AO2  

The raw report is preceded by 3 numbers which denote the location (0=US, 1=Canada, 2=Mexico), data type (1=SA, 2=METAR, 3=Synop, 4=SP, 5=SPECI, 8=Corrrection, 16=Automated, 32=ASOS) and the time of observation. For more information on output formats, see the text output section of the users guide.

There are two types of output data file types available. The ASCII wxp Flat file data type saves all available information in a columnar format which may be edited with a standard text editor. The netCDF data format is a binary format which may be produced by specifying cdf for the output file type.

NOTE: sacvt must be run before any surface plotting and gridding programs may be run.

NOTE: sacvt produces the same converted file name as does smcvt. If the same hour is converted by smcvt, the program will prompt the user for overwrite or append.

EXAMPLES

sacvt -cu=la -pf=over -me=print -pa=update  

This converts the latest hour data file and overwrites any existing file. The station data is updated prior to saving the data to file.

FILES

  • sao.cty - the surface station location database file

SEE ALSO

  • smcvt - the synoptic data decoding program
  • sfcwx - the surface data plotting program
  • sfccalc - the surface data contouring program
  • statlog - the surface meteogram plotting program

For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on Sept 28, 1997