National Weather Service United States Department of Commerce

Active Weather for the West, Warming in the East

The potential for heavy snow at higher elevations in the western U.S. will continue for many spots through the weekend. In the meantime, the eastern half of the continental U.S. will transition to above normal temperatures ahead of a pair of cold fronts next week that will bring readings back to closer to normal as we approach Thanksgiving Day. Read More >

 

Segmentation Process for ASCII Data

(Binary Product Segmentation is discussed in the BBB Documentation)

General Discussion

Bulletins received at the NWS Gateway that exceed the WMO-mandated maximum product length of 3800 bytes are divided into segments before being passed from the message switch to bulletin recipients. A bulletin is identified as being a part of a segmented product by the BBB portion of the WMO abbreviated heading, as outlined in the paraphrased version of the WMO document Guidelines For The Use Of The Indicator BBB   originally written in the report of the WMO Meeting on Operational Matters in 1994. The method by which the segmentation process occurs at the NWS Gateway (WMO RTH) is described.

To facilitate segmentation, bulletins are grouped into two broad classes: Plain Text Products and Decodable Products. Plain Text Products are those that do not contain collections of one or more delimited reports. This class includes narrative text such as a forecast product and report collectives where the reports are not delimited. Decodable Products are those that consist of one or more delimited reports. Examples of this class include bulletins containing reports of WMO and ICAO defined data types such as SYNOP or METAR. Bulletins are identified as belonging to one of these two classes based upon the T1T2 portion of the WMO abbreviated heading. The class of the data shall be taken into account when determining the point at which the original product should be segmented as outlined below.

Segmentation For Plain Text Products

Plain Text Products shall be segmented on a line boundary (the point following a linefeed) such that no segment exceeds the WMO-mandated maximum bulletin length. After determining the maximum breakpoint of a segment (the last character of the segment within the WMO-mandated maximum bulletin length), an end of line character (line feed) is found preceding the line where the maximum breakpoint occurs and the segment is constructed such that it ends with that line feed. Products that do not contain a line-feed within the maximum line length (as defined by the WMO) preceding the maximum breakpoint are broken on the first blank within the maximum line length preceding the maximum breakpoint. If no blank is found within that span, the product is broken at the maximum breakpoint.

Segmentation For Decodable Products

Decodable Products are segmented on a report boundary (as defined by the report delimiter) such that no segment exceeds the WMO-mandated maximum bulletin length. If the report delimiter found is an equal sign, the segment ends after the linefeed that follows the equal sign. An equal sign must be immediately followed by a carriage-return, carriage-return line-feed group [ = ] [ cr ] [ cr ] [ lf ] to be identified as a report delimiter. If the report delimiter found is a one-echo, the segment ends immediately preceding the one-echo delimiter. Products that do not contain a report delimiter within 1300 characters preceding the maximum breakpoint are broken at the maximum breakpoint. The 1300 character search limit is based on the theoretical maximum size of a single report.

Segment Layout

Segments are constructed such that information that pertains to the entire original bulletin is duplicated in each segment. The WMO bulletin heading is duplicated as a segment heading line (with the exception of the original BBB group) for each segment. Bulletins containing an AWIPS heading have that AWIPS heading duplicated in each segment as well. If the original product heading contains a BBB group, that BBB group is also duplicated in the first segment, though not within the bulletin heading since each segment heading has a BBB group of the form Pxx as specified in the WMO document Guidelines For The Use Of The Indicator BBB. Those Decodable Products that contain a supplementary identification line have that line duplicated in each segment.

WMO Heading Duplication

The WMO heading of an original product is duplicated in all segments up to, but not including, the original BBB group, i.e. the T1T1A2ii   CCCC   YYGGgg   portion of the original heading is duplicated. This line is always included in each segment.

AWIPS Heading Duplication

Products with an AWIPS heading (NNNXXX on the second line) shall have the AWIPS heading propagated through each segment. This line is produced in each segment only if the original product contains an AWIPS heading.

Supplementary Identification Line Duplication

If a supplementary identification line (or code type field) is found in a product, it is duplicated in each segment, following the WMO heading, the AWIPS heading (if it is included) and the original BBB group (in first segment only - if it is included).

Code forms that are defined in the WMO Manual On Codes (WMO - No. 306) as having a supplementary identification line are:

FM 12 - SYNOP     FM 13 - SHIP       FM 15 - METAR  FM 16 - SPECI
FM 22 - RADREP  FM 41 - CODAR  FM 42 - AMDAR  FM 51 - TAF
FM 67 - HYDRA

Original BBB Group Duplication

If the original WMO abbreviated heading contains a BBB group, the first segment produced for the product will contain a line following the heading and supplementary identification lines that reflects the original BBB group, exactly as received. This line is present only if the original product had a valid, non-empty BBB group attribute.


Concise Segment Layout

The format of the segment heading is:

T1T2A1A2 ii   CCCC   YYGGgg   Pxx
[supplementary identification line (WMO Report Code groups or NNNXXX group)
[BBB orginal]
segment data

Where

  • T1T2A1A2 ii   CCCC   YYGGgg   is the WMO abbreviated heading [minus the YYGGgg group] as found in the original product.

  • Pxx is the segmentation BBB group as defined in the WMO document Guidelines For The Use Of The Indicator BBB.

  • NNNXXX is the AWIPS second line as found in the original product. This line is included only if the original product contained an AWIPS heading.

  • supplementary identification line is supplementary identification line as found in the original product. This line is included only if the original product contained a supplementary identification line, such as found in WMO Manual 306 on codes.

  • The BBB of the orginal message heading is the BBB original group as found in the abbreviated heading of the original product. This line is included only if the original product abbreviated heading contained a valid BBB group.

Examples

Examples of original products and the segments produced from those products are provided below.

  • Example 1. This illustrates the simplest case of an original bulletin that contains only a WMO heading:
    Original Product:
    
    AWUS41 KWBC 250050
    TEXT ...
         .
         .
         .
    
    Segmented Products:
    
    AWUS41 KWBC 250050 PAA
    TEXT .... [ cr ] [ cr ] [ lf ]
         .
         .
         .
    
    AWUS41 KWBC 250050 PZB
    TEXT ...
         .
         .
         .       
  • Example 2. This illustrates the case of an AWIPS heading.

    Original Product:

    
    SMVD01 KWBC 250000
    SHPAT1
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    Segmented Products:
    
    SMVD01 KWBC 250000 PAA
    SHPAT1
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    SMVD01 KWBC 250000 PZB
    SHPAT1
    MONOA 25004 99001 70001 ...=
         .
         .
         .      
  • Example 3. This illustrates the case of a WMO heading with a second line that applies to the entire product.
    Original Product:
    
    SMVD01 KWBC 250000
    BBXX
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    Segmented Products:
    
    SMVD01 KWBC 250000 PAA
    BBXX
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    SMVD01 KWBC 250000 PZB
    BBXX
    SHIP 25004 99001 70001 ...=
         .
         .
         .    
  • Example 4. This illustrates the case of a WMO heading with BBB GROUP.
    Original Product:
    
    SMVD01 KWBC 250000 RRA
    BBXX
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    Segmented Products:
    
    SMVD01 KWBC 250000 PAA
    BBXX
    RRA
    SHIP 25004 99001 70001 ...=
         .
         .
         .
    
    SMVD01 KWBC 250000 PZB
    BBXX
    MONOA 25004 99001 70001 ...=
         .
         .
         .