Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

SMCVT

Sections

NAME

smcvt - Synoptic surface data conversion program

SYNOPSIS

smcvt [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 smcvt 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
-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 syn_dat Specifies the input file name tag. The default is syn_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, all
Specifies what type of output file is to be created:
  • wxp - WXP ASCII converted file. Name convention set to syn_cvt_wxp.
  • cdf - NetCDF binary converted file. Name convention set to syn_cvt_cdf.

Specifies which type of synoptic data to save:

  • all - all synoptic reports
  • land - all land based reports
  • cman - CMAN station
  • buoy - stationary buoy
  • ship - ship report
  • dribu - drifting buoy
-of=out_file out_file syn_cvt The out_file resource specifies the output file name tag. The default is syn_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 specifies 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:
  • wmo - save station with its WMO ID (5 digit).
  • id - save station with its ICAO ID (4 letter).
  • id_enc - save station with its ICAO ID and encode one if missing.
  • 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: -90:90)
  • 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, Ship, 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, Ship, CMAN, DRIBU).  smcvt program handles hourly data in each of the above listed formats. All stations for a particular report time are decoded and put into an output converted data file.

The smcvt program will first prompt the user for the input raw data file. This file should contain the synoptic reports for a given time. It is recommended that these files be split up on 3 or 6 hourly boundaries since this type of data is reported once every 6 hours with intermediate reports every 3 hours. 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 syn_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. 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 synoptic 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   Cht Cv  Vis   PWx  SLPres   T  Td  WD-WS WG  Te  PT   Rn6 Rn24 SC L:M:H
Processing file: /rainbow/data/ddplus/00060797.syn
72405   30 8  15.0       1020.7  63  50 120- 7    67  0.3              8:7:-
72597      1  28.1       1011.0  80  47 300- 6    80 -1.5              1:0:0
72652      1  15.0       1013.1  82  49   0- 0    82 -1.0              0:0:2
72594      0  10.0       1013.4  63  53 360-12    65 -0.2
91165      1  15.0       1018.7  82  73  70-15    75 -1.2      0.02    1:0:0
78650   45 8   1.2  TRW- 1006.4  80  77 270- 4    87  1.6 0.47         9:2:-
78655   45 8  15.6               73  68 100- 2    80                   8:4:0
78663   15 8   2.5       1006.5  71  70   0- 0    72 -1.1 0.08 0.09    8:2:0
91285   15 7   6.9   RW- 1017.2  79  72  40- 6    72 -1.4      0.20    8:0:0
91182   30 3  15.0       1018.0  87  67  90-16    75 -1.2      0.00    8:0:0
b51003                    1015.6  80      40-10
b51002                    1015.9  76     100-17                               

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

 ID   Cht Cv  Vis   PWx  SLPres   T  Td  WD-WS WG  Te  PT   Rn6 Rn24 SC L:M:H
Processing file: /rainbow/data/ddplus/00060797.syn
1:72405:72405 32574 81207 10173 20102 30183 40207 53003 8287/ 333 10195 20118 555 90700
72405   30 8  15.0       1020.7  63  50 120- 7    67  0.3              8:7:-
1:72597:72597 32783 13006 10266 20085 39639 40110 57015 81100 333 10266 20078 555 90700
72597      1  28.1       1011.0  80  47 300- 6    80 -1.5              1:0:0
1:72652:72652 32874 10000 10276 20097 39605 40131 58010 80002 333 10278 20128 81057
72652      1  15.0       1013.1  82  49   0- 0    82 -1.0              0:0:2
1:72594:72594 32966 03612 10170 20116 30134 40134 58002 333 10181 20132
72594      0  10.0       1013.4  63  53 360-12    65 -0.2
1:91165:91165 12474 10715 10277 20230 30135 40187 58012 69954 81100 333 20241 561// 59002 70005 555 90700
91165      1  15.0       1018.7  82  73  70-15    75 -1.2      0.02    1:0:0
1:78650:78650 21620 82704 10264 20250 40064 52016 79598 8792/ 222// 20603 333 072/ 10304 20264 32/// 58016 60121 85827 82930 84640
78650   45 8   1.2  TRW- 1006.4  80  77 270- 4    87  1.6 0.47         9:2:-
1:78655:78655 32675 81002 10226 20200 3//// 4//// 5//// 70200 83840 333 0173/ 10264 20206 30/// 5//// 83637 86370
78655   45 8  15.6               73  68 100- 2    80                   8:4:0
1:78663:78663 21440 80000 10218 20212 39384 40065 57011 70386 88820 333 021// 10222 20215 32/// 60021 70023 83810 87633 85465
78663   15 8   2.5       1006.5  71  70   0- 0    72 -1.1 0.08 0.09    8:2:0
1:91285:91285 11461 70406 10262 20225 30159 40172 58014 60054 78082 87800 333 20222 562// 59005 70046 555 90700
91285   15 7   6.9   RW- 1017.2  79  72  40- 6    72 -1.4      0.20    8:0:0
1:91182:91182 12574 30916 10308 20196 30174 40180 57012 69904 83800 333 20239 56999 58000 555 90700
91182   30 3  15.0       1018.0  87  67  90-16    75 -1.2      0.00    8:0:0
1:72613:72613 32289 43409 10067 20009 38132 54000 81108  333 10077 20000
72613    4 4  46.9               44  34 340- 9    46  0.0              1:0:8
4:51003:51003 07001 99191 71608 46/// /0405 10264 40156 92349 22200 00270 10803 70017 333 91206 555 11055 22058
b51003                    1015.6  80      40-10
4:51002:51002 07001 99172 71578 46/// /1009 10242 40159 92349 22200 00272 11304 70020 333 91211 555 11093 22098
b51002                    1015.9  76     100-17                               

The raw report is preceded by the report type (1=land, 2=ship, 4=buoy, 8=dribu, 16=cman). 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.

The output file may save the ID either as the WMO number (as broadcasted) or as a ICAO ID (3 or 4 letter). If the station does not have an ICAO ID, one will be derived from the WMO number using the 2 letter country prefix and the last 3 numbers of the WMO number (-pa=id_enc).   Country prefixes are listed in the Global Station Information Appendix.

Station IDs for buoys are always preceded with a "b".  Station IDs for ships are always preceded with a "s".  DRIBUs don't have an ID and are listed as "DRIBU".

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

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

EXAMPLES

smcvt -cu=$current -dh=cu-15+15 -of=sfc_cvt -pa=update -pf=app \
  -me=print -ou=ship,cman,buoy,dribu

This converts the synoptic data minus land stations. The decode hour is set to make sure only those reports within 15 minutes of the report time are saved. The output goes to the same file as the sacvt program (with the METAR/SAO reports). The converted data is appended to the end of the METAR data.

smcvt -cu=$current -dh=cu-15+15 -if=cman_dat -pa=update \
  -of=sfc_cvt -pf=app -me=print 

This produces a decode file from CMAN data which is stored in a different file from the regular synoptic data as pointed to by the cman_dat tag. The data are appended to the same surface converted file as sacvt and only those reports within 15 minutes of the report time are saved. The update parameter tells the program to only saved updated reports.

FILES

  • syn.cty - the surface station location database file

SEE ALSO

  • sacvt - 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 June 24, 1998