home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / formats / bufr / spec / bufr.txt < prev    next >
Encoding:
Text File  |  1994-06-01  |  214.7 KB  |  4,384 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                        A GUIDE TO THE WMO CODE FORM
  12.  
  13.                             FM 94-IX EXT. BUFR
  14.  
  15.  
  16.                                  W. Thorpe
  17.  
  18.                     Fleet Numerical Oceanography Center
  19.  
  20.                            Monterey, California
  21.               A GUIDE TO THE WMO CODE FORM FM 94-IX EXT. BUFR
  22.  
  23.  
  24.                              TABLE OF CONTENTS
  25.                                                        Page
  26.  
  27. TABLE OF CONTENTS                                        i
  28. LIST OF FIGURES                                        iii
  29. LIST OF TABLES                                           v
  30. INTRODUCTION                                            vi
  31.  
  32. CHAPTER 1. SECTIONS OF A BUFR MESSAGE                  1-1
  33.   1.1     Introduction                                 1-1
  34.   1.2     Specifications of octets within each         1-1
  35.           section
  36.   1.2.1   Section 0 - Indicator Section                1-3
  37.   1.2.2   Section 1 - Identification Section           1-5
  38.   1.2.3   Section 2 - Optional Section                 1-7
  39.   1.2.4   Section 3 - Data Description Section         1-8
  40.   1.2.5   Section 4 - Data Section                     1-10
  41.   1.2.6   Section 5 - End Section                      1-10
  42.   1.2.7   Required Entries                             1-10
  43.   1.2.8   BUFR and Data Management                     1-11
  44.  
  45. CHAPTER 2. BUFR TABLES                                 2-1
  46.   2.1     Introduction                                 2-1
  47.   2.2     Table A - Data Category                      2-1
  48.   2.3     Table B - Classification of Elements         2-2
  49.   2.3.1   Data Replication                             2-4
  50.   2.4     Table C - Data Description Operators         2-5
  51.   2.5     Table D - Lists of Common Sequences          2-5
  52.   2.6     Message Layout                               2-7 
  53.   2.6.1   Comparison of BUFR and Character Code        2-7
  54.           Bit Counts
  55.   2.7     Code Tables and Flag Tables                  2-12
  56.   2.7.1   Code Tables                                  2-12
  57.   2.7.2   Flag Tables                                  2-12
  58.   2.7.3   Flags                                        2-12
  59.   2.8     Local Tables                                 2-13
  60.  
  61. CHAPTER 3. USING DATA REPLICATION                      3-1
  62.   3.1     Introduction                                 3-1
  63.   3.2     Data Replication Examples                    3-1
  64.  
  65. CHAPTER 4. DATA COMPRESSION                            4-1
  66.   4.1     Introduction                                 4-1
  67.   4.2     Method Used for Compression                  4-1
  68. CHAPTER 5. TABLE C - DATA DESCRIPTION OPERATORS      5-1
  69.   5.1     Introduction                                 5-1
  70.   5.2     Changing Data Width, Scale and Reference     5-1
  71.           Values
  72.   5.2.1   Changing Reference Value Only                5-7
  73.   5.3     Add Associated Field                         5-10
  74.   5.4     Encoding Character Data                      5-15
  75.   5.5     Signifying Length of Local Descriptors       5-16
  76.  
  77. CHAPTER 6. Quirks, Advanced Features, and Special      6-1
  78.            Uses of BUFR
  79.   6.1     Introduction                                 6-1
  80.   6.2     Section 0 - Indicator Section                6-1        
  81.   6.2.1   Edition Number Changes                       6-1
  82.   6.2.2   Maximum Size of BUFR Records                 6-3
  83.   6.3     Section 1 - Identification Section           6-3
  84.   6.3.1   Master Tables, Version Numbers, and Local    6-3
  85.           Tables
  86.   6.3.2   Originating Centre (or Center)               6-4
  87.   6.3.3   Update Sequence Number                       6-5
  88.   6.3.4   Optional Section 2                           6-5
  89.   6.3.5   BUFR Message Sub-Type                        6-5
  90.   6.3.6   Date/Time                                    6-7
  91.   6.3.7   "Reserved for use..."                        6-7
  92.   6.4     Section 2 - Optional Section - Example of    6-8
  93.           Data Base Keys
  94.   6.4.1   U.S. National Meteorological Center Usage    6-8
  95.   6.4.1.1 BUFR as a Data Base Storage Format           6-9
  96.   6.5     Section 3 - Data Description Section         6-10
  97.   6.5.1   Data Subsets                                 6-10
  98.   6.5.2   Observed or "other data"                     6-11
  99.   6.5.3   Data Descriptors                             6-11
  100.   6.5.3.1 Descriptors for "Coordinates"                6-12
  101.   6.5.3.2 Replication, Increments and "Run-Length      6-14
  102.           Encoding"
  103.   6.5.3.3 The Associated Field                         6-17
  104.   6.5.3.4 Changing Descriptors "On the Fly"            6-17
  105.   6.5.3.5 BUFR Records in Archives                     6-18
  106.                                                                   
  107. CHAPTER 7. Use of Binary Representation at ECMWF       7-1
  108.   7.1     Introduction                                 7-1
  109.   7.2     Operational Data Management                  7-1
  110.   7.3     Use of BUFR                                  7-2
  111.   7.4     Use of GRIB                                  7-3
  112.   7.5     Concluding Remarks                           7-3
  113.  
  114. APPENDIX A. REFERENCES                                 A-1
  115.                               LIST OF FIGURES
  116.  
  117. Figure
  118.  
  119. 1-1  Example of a complete BUFR message containing     1-2
  120.      52 octets
  121.  
  122. 1-2  Section 0                                         1-4
  123.     
  124. 1-3  Section 1                                         1-6
  125.      
  126. 1-4  Section 3                                         1-9
  127.  
  128. 1-5  Section 4                                         1-12
  129.  
  130. 1-6  Section 4 data as described by descriptors        1-12
  131.  
  132. 1-7  Section 5                                         1-12
  133.  
  134. 1-8  Required entries in sample BUFR message           1-13
  135.  
  136. 2-1  Example of surface observations sequence using    2-9 
  137.      Table D descriptor 3 07 002
  138.  
  139. 2-2  BUFR message of 1 surface observation using       2-10
  140.      Table D descriptor 3 07 002
  141.  
  142. 2-3  BUFR message of 448 surface observations using    2-11
  143.      Table D descriptor 3 07 002
  144.  
  145. 2-4  Table reservations                                2-13
  146.  
  147. 2-5  Example of surface observations sequence using    2-15
  148.      Table D descriptor 3 07 002 and a local           
  149.      descriptor 
  150.  
  151. 2-6  BUFR message of 443 surface observations using    2-16
  152.      2 descriptors
  153.  
  154. 3-1  Example of TEMP observations sequence using       3-3
  155.      delayed replication
  156.  
  157. 4-1  Comparison of non-compressed and compressed       4-3
  158.      data in Section 4
  159.  
  160. 4-2  BUFR message of 6 subsets in non-compressed       4-7 
  161.      form
  162.  
  163. 4-3  BUFR message of 6 subsets in compressed form      4-8
  164.  
  165.  
  166.  
  167. 4-4  BUFR message of 1898 subsets in non-compressed    4-9
  168.      form
  169.  
  170. 4-5  BUFR message of 4267 subsets in compressed        4-10
  171.      form
  172.  
  173. 5-1  Change reference value of geopotential            5-9 
  174.  
  175. 5-2  Example of TEMP observations sequence using       5-14
  176.      delayed replication and quality control
  177.      information
  178.  
  179. 5-3  Example of surface observations with local        5-17
  180.      descriptor and data descriptor 2 06 Y
  181.                               LIST OF TABLES
  182.  
  183. Table
  184.  
  185. 2-1  BUFR Table A - Data Category                      2-1
  186.  
  187. 2-2  BUFR Table D - List of Common Sequences           2-6
  188.  
  189. 5-1  BUFR Table C - Data Description operators         5-2
  190.                                INTRODUCTION
  191.  
  192. The World Meteorological Organization (WMO) code form FM 94-IX
  193. Ext. BUFR(Binary Universal Form for the Representation of
  194. meteorological data) is a binary code designed to represent,
  195. employing a continuous binary stream, any meteorological data. 
  196. There is, however, nothing uniquely meteorological about BUFR. 
  197. The meteorological emphasis is the result of the origin of the
  198. code.  The code form may be applied to any numerical or
  199. qualitative data type.
  200.  
  201. BUFR is the result of a series of informal and formal "expert
  202. meetings" and periods of experimental usage by several
  203. meteorological data processing centers.  The WMO Commission for
  204. Basic Systems (CBS) approved BUFR at its January/February 1988
  205. meeting.  Changes were introduced at the CBS Working Group on
  206. Data Management, Sub-Group on Data Representation meetings in
  207. May, 1989 and October 1990.  The changes introduced at the
  208. October 1990 meeting were of such magnitude that BUFR, Edition 2
  209. was defined, with an effective date of November 7, 1991.
  210.  
  211. The key to understanding the power of BUFR is the code's
  212. self-descriptive nature.  A BUFR "message" (or record, the terms
  213. are interchangeable in this context) containing observational
  214. data of any sort also contains a complete description of what
  215. those data are: the description includes identifying the
  216. parameter in question, (height, temperature, pressure, latitude,
  217. date and time, whatever), the units, any decimal scaling that may
  218. have been employed to change the precision from that of the
  219. original units, data compression that may have been applied for
  220. efficiency, and the number of binary bits used to contain the
  221. numeric value of the observation.  This data description is all
  222. contained in tables which are the major part of the BUFR
  223. documentation.
  224.  
  225. The strength of this self-descriptive feature is in accommodating
  226. change.  For example, if new observations or observational
  227. platforms are developed, there is no need to invent a new code
  228. form to represent and transmit the new data; all that is
  229. necessary is the publication of additional data description
  230. tables.  Similarly for the deletion of possibly outdated
  231. observations: instead of having to send "missing" indicators for
  232. a long period while awaiting a change to a fixed format code, the
  233. "missing" data are simply not sent in the message and the data
  234. description section is adjusted accordingly.  The data
  235. description tables are not changed, however, so that archives of
  236. old data may be retrieved.
  237.  
  238. This self-descriptive feature leads to another advantage over
  239. character oriented codes - The relative ease of decoding a BUFR
  240. message.  Where a large number of specialized and complex
  241. programs are now needed to decode the plethora of character codes
  242. in current use, it is entirely feasible to write a single
  243. "universal BUFR decoder" program capable of decoding any BUFR
  244. message.  It is not 
  245. a trivial task to write such a BUFR decoder, but once it is done,
  246. it is done for all time.  The program will not have to change with
  247. changes in observational practices; only the tables will need to be
  248. augmented, a relatively trivial task.
  249.  
  250. The development of BUFR has been synonymous with the development of
  251. the data description language that is integral to it.  Indeed the
  252. major portion of the full description of BUFR is a description of
  253. the vocabulary and syntax of the data description language.  The
  254. definition of the data description language, and the "descriptors"
  255. that are its vocabulary, are what give BUFR its "universal" aspect:
  256. any piece of information can be described in the language, not just
  257. meteorological observations. 
  258.  
  259. The other major aspect of BUFR is reflected in the first initial,
  260. "B"; BUFR is a purely binary or bit oriented form, thus making it
  261. both machine dependent and, at the same time, machine independent. 
  262. The dependency comes in the construction or interpretation of BUFR
  263. messages: there is not much for a human to look at (unless she is
  264. very patient) as all the numbers in a message, whether data
  265. descriptors or the data themselves, are binary integers.  And that,
  266. of course, leads to the machine independence: with BUFR consisting
  267. entirely of binary integers any brand of machine can handle BUFR as
  268. well as any other.
  269.  
  270. The binary nature of BUFR leads to another advantage over character
  271. codes: the ease and speed of converting the message into an
  272. internally useful numeric format.  With character codes the
  273. conversion from ASCII (or EBCDIC) to integer or floating point is
  274. expensive relative to the conversion from binary integers to
  275. floating point.  The latter is all that BUFR requires.  In some
  276. tests, the European Centre for Medium-Range Weather Forecasts found
  277. a speedup of better than 6 times in decoding BUFR messages over the
  278. corresponding TEMP (WMO Radiosonde character code FM 35-IX Ext.)
  279. messages.  The BUFR data also required about half the machine
  280. memory as the character data.
  281.  
  282. All of this does assume the availability of well designed computer
  283. programs that are capable of parsing the descriptors, which can be
  284. a complex task, matching them to the bit stream of data and
  285. extracting the numbers from the stream, responding properly to the
  286. arrival of new (or the departure of old) data descriptors, and
  287. reformatting the numbers in a way suitable for subsequent
  288. calculations.  The bit oriented nature of the message also requires
  289. the availability of bit transparent communications systems such as
  290. the x.25 protocol.  Such protocols have various error detecting
  291. schemes built in so there need be little concern about the
  292. corruption of information in the transmission process.   
  293.  
  294.                                    Dr. John D. Stackpole
  295.                                    NOAA/NWS
  296.                                    National Meteorological Center
  297.                                    Camp Springs, MD 20746 U.S.A
  298.  
  299.  
  300.                                  CHAPTER 1
  301.  
  302.                         Sections of a BUFR Message
  303.  
  304. 1.1 Introduction.  The term "message" refers to BUFR being used
  305. as a data transmission format; however, BUFR can, and is, used in
  306. several meteorological data processing centers as an on-line
  307. storage format as well as a data archiving format.
  308.  
  309. 1.2 Specifications of Octets Within Each Section.  For
  310. transmission of data, each BUFR message consists of a continuous
  311. binary stream comprising 6 sections.
  312.  
  313.  
  314.  
  315.  
  316.                C O N T I N U O U S  B I N A R Y  S T R E A M
  317.  
  318.  
  319.                                  section
  320.                                     
  321.                                     0
  322.                                   section
  323.  
  324.                                      1
  325.                                   section
  326.  
  327.                                      2
  328.                                   section
  329.  
  330.                                      3
  331.                                   section
  332.  
  333.                                      4
  334.                                   section
  335.  
  336.                                      5
  337.  
  338.  
  339. Section    Name                   Contents
  340. number
  341.  
  342.   0  indicator section   "BUFR" (coded according to the CCITT
  343.                          International Alphabet No. 5, which is
  344.                          functionally equivalent to ASCII), length
  345.                          of message, BUFR edition number
  346.  
  347.   1  identification      length of section, identification of the
  348.      section             message 
  349.      
  350.   2  optional section    length of section and any additional items 
  351.                          for local use by data processing centers
  352.  
  353.   3  data description    length of section, number of data  
  354.             section subsets, data category flag, data  
  355.                          compression flag, and a collection of data
  356.                          descriptors which define the form and
  357.                          content of individual data elements
  358.  
  359.   4  data section        length of section and binary data
  360.  
  361.   5  end section         "7777" (coded in CCITT International
  362.                          Alphabet No. 5)
  363.  
  364. Each of the sections of a BUFR message is made up of a series of
  365. octets.  The term octet, meaning 8 bits, was coined to avoid having
  366. to continually qualify byte as an 8-bit byte.  Also, in French, the
  367. words "byte" and "bit" are pronounced the same (as "beet"), "octet"
  368. clearly avoids that problem, too.  An individual section shall
  369. always consist of an even number of octets, with extra bits added
  370. on and set to zero when necessary.  Within each section, octets are
  371. numbered 1, 2, 3, etc., starting at the beginning of each section. 
  372. Bit positions within octets are  referred to as bit 1 to bit 8,
  373. where bit 1 is the most significant, leftmost, or high order bit. 
  374. An octet with only bit 8 set would have the integer value 1.  
  375.  
  376. Theoretically there is no upper limit to the size of a BUFR message
  377. but, by convention, BUFR messages are restricted to 15000 octets or
  378. 120000 bits.  This limit is to allow an entire BUFR message to be
  379. contained within memory of most computers for decoding.  It is also
  380. a limit set by the capabilities of the Global Telecommunications
  381. System (GTS) of the WMO.  The BLOK feature, described elsewhere,
  382. can be used to break very long BUFR messages into parts, if
  383. necessary.
  384.  
  385. Figure 1-1 is an example of a complete BUFR message containing 52
  386. octets.  This particular message contains 1 temperature observation
  387. of 295.2 degrees K from WMO block/station 72491.  Figures 1-2
  388. through 1-7 illustrate decoding of the individual sections.  The
  389. spaces between octets in Figures 1-2 through 1-7 were added to
  390. improve readability.
  391.  
  392.  
  393. ED. NOTE:  To see the figures more clearly, refer to the Word or
  394. WordPerfect files.
  395.  
  396.                                                                               
  397.                                             end of section 0 ──┐              
  398.                                                                │              
  399. 010000100101010101000110010100100000000000000000001101000000001000000000000000
  400.                                                                               
  401.                                                                               
  402.                                                                               
  403. 000001001000000000000000000011100000000000000000000000001000000000000000100000
  404.                                                                                
  405.                                 end of section 1 ──┐                          
  406.                                                    │                          
  407. 000101011101000001000001110100001100000000000000000000000000000000000000111000
  408.                                                                               
  409.                                                                               
  410.                                                                               
  411. 000000000000000000000110000000000000010000000100000001000000100000110000000100    
  412.                                                                            
  413.        ┌── end of section 3                         end of section 4 ──┐      
  414.        │                                                               │      
  415. 000000000100000000000000000010000000000010010000111101011101110001000000001101
  416.                                                                               
  417.       end of section 5 ──┐                                                    
  418.                          │                                                    
  419. 11001101110011011100110111                                                        
  420.                                                                                   
  421.                                                                           
  422.   Figure 1-1. Example of a complete BUFR message containing 52
  423. octets
  424.                        
  425.  
  426.  
  427.   
  428.  
  429. 1.2.1 Section 0 - Indicator section.
  430.  
  431.  
  432.  
  433.  
  434.                            C O N T I N U O U S  B I N A R Y  S T R E A M
  435.  
  436.  
  437.  SECTION
  438.  
  439.     0   
  440.                                               section
  441.  
  442.                                                  1
  443.                                               section
  444.  
  445.                                                  2
  446.                                               section
  447.  
  448.                                                  3
  449.                                               section
  450.  
  451.                                                  4
  452.                                               section
  453.  
  454.                                                  5
  455.  
  456.  
  457. Octet No.       contents
  458.  
  459. 1 - 4     "BUFR" (coded according to the CCITT International 
  460.           Alphabet No. 5)
  461.  
  462. 5 - 7     Total length of BUFR message, in octets (including
  463.           Section 0)
  464.  
  465.     8     BUFR edition number (currently 2)
  466.  
  467. The earlier editions of BUFR did not include the total message length
  468. in octets 5-7.  Thus, in decoding BUFR Edition 0 and 1 messages,
  469. there was no way of determining the entire length of the message
  470. without scanning ahead to find the individual lengths of each of the
  471. sections.  Edition 2 eliminates this problem by including the total
  472. message length right up front.  By design, in BUFR Edition 2, octet 8,
  473. containing the BUFR Edition number, is in the same octet position
  474. relative to the start of the message as it was in Editions 0 and 1.
  475. By keeping the relative position fixed, a decoder program can
  476. determine, at the outset, which BUFR version was used for a
  477. particular message and then behave accordingly.  This means, for
  478. example, that archives of old (pre-Edition 2) records need not be
  479. updated.
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.         OCTET NO.           1        2        3        4        5        6        7        8                     
  488.                                                                                                                  
  489. BINARY          01000010 01010101 01000110 01010010 00000000 00000000 00110100 00000010                          
  490.                                                                                                          
  491. HEXADECIMAL       4   2    5   5    4   6    5   2    0   0    0   0    3   4    0   2                           
  492.                                                                                                           DECODED 
  493.             B        U        F        R                         52        2                                     
  494.                                                               │        │                                         
  495.                                                           │        │                                             
  496.                                                       │        │                                                 
  497.                   length of message in octets ────┘        │                                                     
  498.                                                        │                                                         
  499.                                   BUFR Edition ────┘                                                             
  500.                                                                                                                  
  501.                                                                                                                  
  502.                                                                                                                  
  503.                                                    
  504. Figur                                    e 1-2. Section 0
  505.       
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524. 1.2.2 Section 1 - Identification Section.
  525.  
  526.  
  527.  
  528.  
  529.                C O N T I N U O U S  B I N A R Y  S T R E A M
  530.  
  531.  
  532.                                  section
  533.                                     
  534.                                     0
  535.                                   SECTION
  536.  
  537.                                      1
  538.                                   section
  539.  
  540.                                      2
  541.                                   section
  542.  
  543.                                      3
  544.                                   section
  545.  
  546.                                      4
  547.                                   section
  548.  
  549.                                      5
  550.  
  551.  
  552. Octet No.      contents
  553.  
  554. 1 - 3          Length of section, in octets
  555.  
  556.     4          BUFR master table (zero if standard WMO FM 94-IX
  557.                EXT. BUFR tables are used - provides for BUFR to be
  558.                used to represent data from other disciplines, and
  559.                with their own versions of master tables and local
  560.                tables)
  561.  
  562. 5 - 6          Originating centre: code table 0 01 031
  563.  
  564.     7          Update sequence number (zero for original BUFR             
  565.              messages; incremented for updates)
  566.  
  567.     8          Bit  1 = 0  No optional section
  568.                       = 1  Optional section included
  569.  
  570.                Bits 2 - 8  set to zero (reserved)
  571.         
  572.     9          Data Category type (BUFR Table A)
  573.  
  574.    10          Data Category sub-type (defined by local ADP                    
  575. centres)
  576.  
  577.    11          Version number of master tables used (currently 2 
  578.                for WMO FM 94-IX EXT. BUFR tables)
  579.  
  580.    12          Version number of local tables used to augment the
  581.                master table in use
  582.  
  583.    13          Year of century 
  584.  
  585.    14          Month
  586.  
  587.    15          Day
  588.  
  589.    16          Hour
  590.  
  591.    17          Minute
  592.  
  593.  18 -          Reserved for local use by ADP centres
  594.  
  595.         OCTET NO.           1        2        3        4        5        6        7        8                 
  596.                                                                                                                  
  597.     BINARY          00000000 00000000 00010010 00000000 00000000 00111000 00000000 00000000                      
  598.                                                                                │                             
  599. HEXADECIMAL       0   0    0   0    1   2    0   0    0   0    3   A    0   0  │                                 
  600.                                                                            │                              DECODED 
  601.                              18       0                 58            │                                          
  602.    length of section  ────┘       │                  │            │                                              
  603.     standard BUFR tables  ────┘                  │            │                                                  
  604.     originating center (US Navy - FNOC)  ────┘            │                                                      
  605.           flag indicating Section 2 not included  ────┘                                                          
  606.                                                                                                                  
  607.                                                                    
  608.                                                                                                              
  609.                                                                                                                  
  610.    OCTET NO.           9       10       11       12       13       14       15       16                          
  611.                                                                                                              BINARY 
  612.         00000010 00000000 00000010 00000001 01011101 00000100 00011101 00001100                                  
  613.                                                                                                   HEXADECIMAL    
  614.   0   2    0   0    0   2    0   1    5   D    0   4    1   D    0   C                                           
  615.                                                                                           DECODED              2 
  616.       0        2        1       94        4       29        12                             data category ──┘     
  617.   │        │        │        │        │        │         │                            data category sub-type ───┘ 
  618.       │        │        │        │        │         │                                   version of master tables
  619. ───┘        │        │        │        │         │                                             version of local
  620. tables ───┘        │        │        │         │                                                              year
  621. of century ───┘        │        │         │                                                                      
  622.           month ───┘        │         │                                                                          
  623.                  day ───┘         │                                                                              
  624.                       hour ───┘                                                                                  
  625.                                                    OCTET NO.          17       18                                
  626.                                                                                                                  
  627.                                            BINARY          00000000 00000000                                     
  628.                                                                                                                  
  629.                                    HEXADECIMAL       0   0    0   0                                              
  630.                                                                                                                  
  631.                            DECODED              0        0                                                       
  632.                                             │        │                                                           
  633.                               minute ───┘        │                                                               
  634.                                 local use ───┘                                                                   
  635.                                                                                                                  
  636.                                  Figure 1-3.  Section 1 
  637. The length of section 1 can vary between BUFR messages.  Beginning
  638. with Octet 18, a data processing center may add any type of
  639. information as they choose.  A decoding program may not know what
  640. that information may be.  Knowing what the length of the section
  641. is, as indicated in octets 1-3, a decoder program can skip over the
  642. information that begins at octet 18 and position itself at the next
  643. section, either section 2, if included, or section 3.  Bit 1 of
  644. octet 8 indicates if section 2 is included.  If there is no
  645. information beginning at octet 18, one octet must still be included
  646. (set to 0) in order to have an even number of octets within the
  647. section.
  648.  
  649. 1.2.3 Section 2 - Optional Section.
  650.  
  651.  
  652.  
  653.  
  654.                C O N T I N U O U S  B I N A R Y  S T R E A M
  655.  
  656.  
  657.                                  section
  658.                                     
  659.                                     0
  660.                                   section
  661.  
  662.                                      1
  663.                                   SECTION
  664.  
  665.                                      2
  666.                                   section
  667.  
  668.                                      3
  669.                                   section
  670.  
  671.                                      4
  672.                                   section
  673.  
  674.                                      5
  675.  
  676.  
  677. Octet No.      Contents
  678.  
  679. 1 - 3          Length of section, in octets
  680.  
  681.     4          set to zero (reserved)
  682.  
  683.   5 -          Reserved for use by ADP centres
  684.  
  685. Section 2 may or may not be included in any BUFR message.  When it
  686. is contained within a BUFR message, bit 1 of octet 8, Section 1, is
  687. set to 1.  If Section 2 is not included in a message then bit 1 of
  688. octet 8, Section 1 is set to 0.  Section 2 may be used for any
  689. purpose by an originating center.  The only restrictions on the use
  690. of Section 2 are that octets 1 - 3 are set to the length of the
  691. section, octet 4 is set to zero and the total length of the section
  692. contains an even number of octets.
  693.  
  694. A typical use of this optional section could be in a data base
  695. context.  The section might contain pointers into the data section
  696. of the message, pointers which indicate the relative location of
  697. the start of individual sets of observations (one station's worth,
  698. for example) in the data.  There could also be some sort of index
  699. term included, such as the WMO block and station number.  This
  700. would make it quite easy to find a particular observation quickly
  701. and avoid decoding the whole message just to find one or two
  702. specific data elements.
  703. 1.2.4 Section 3 - Data description section.
  704.  
  705.  
  706.  
  707.  
  708.                C O N T I N U O U S  B I N A R Y  S T R E A M
  709.  
  710.  
  711.                                  section
  712.                                     
  713.                                     0
  714.                                   section
  715.  
  716.                                      1
  717.                                   section
  718.  
  719.                                      2
  720.                                   SECTION
  721.  
  722.                                      3
  723.                                   section
  724.  
  725.                                      4
  726.                                   section
  727.  
  728.                                      5
  729.  
  730.  
  731. Octet No.      Contents
  732.  
  733. 1 - 3          Length of section, in octets
  734.  
  735.     4          set to zero (reserved)
  736.  
  737. 5 - 6          number of data subsets
  738.  
  739.     7          Bit 1 = 1  observed data
  740.  
  741.                      = 0  other data
  742.  
  743.                Bit 2 = 1  compressed data
  744.  
  745.                      = 0  non-compressed data
  746.  
  747.                Bit 3 - 8  set to zero (reserved)
  748.  
  749.   8 -          A collection of descriptors which define the form
  750.                and content of individual data elements comprising
  751.                one data subset in the data section.
  752.  
  753. If octets 5-6 indicate that there is more than one data subset in
  754. the message, with the total number of the subsets given in those
  755. octets, then multiple sets of observations, all with the same
  756. format (as described by the data descriptors) will be found in
  757. Section 4.  This is, for example, a means of building "collectives"
  758. of observations.  Doing so realizes a large portion of the
  759. potential of efficiency in BUFR.
  760.  
  761. In the flag bits of octet 7, "observed data" is taken to mean just
  762. that; "other data", is by custom, if not explicit statement,
  763. presumed to be forecast information, or possibly some form of
  764. "observation", indirectly derived from "true" observations.  The
  765. nature of "data compression" will be described in Chapter 4.
  766.  
  767.  
  768.  
  769.  
  770.  
  771.         OCTET NO.           1        2        3        4        5        6        7                                                                                                                                            
  772.     BINARY          00000000 00000000 00001110 00000000 00000000 00000001 10000000                               
  773.                                                                       ││                                     
  774. HEXADECIMAL       0   0    0   0    0   E    0   0    0   0    0   1  ││                                         
  775.                                                                   ││                                     
  776. DECODED                               14        0        0        1   ││                                         
  777.                                    │        │                 │   ││                                             
  778.           length of section ───┘        │                 │   ││                                                 
  779.                         reserved ───┘                 │   ││                                                     
  780.                         number of data subsets ───┘   ││                                                         
  781.                  flag indicating observed data ───┘│                                                             
  782.        flag indicating non-compressed data ────┘                                                                 
  783.                                                                          
  784.                                                                                                              
  785.         OCTET NO.           8        9       10       11       12       13       14                              
  786.                                                                                                                  
  787. BINARY          00000001 00000001 00000001 00000010 00001100 00000100 00000000                                   
  788.                                                                                                          
  789. HEXADECIMAL       0   1    0   1    0   1    0   2    0   C    0   4    0   0                                    
  790.                                                                                                          
  791. DECODED               0 01 001          0 01 002          0 12 004        0                                      
  792.                       │                 │                 │           │                                  
  793. descriptors in F X Y  ────┴─────────────────┴─────────────────┘           │                                   
  794. format (Chapter 2)                                                       │                                       
  795.                                                                      │                                           
  796.                              needed to complete section with ────┘                                               
  797.                             an even number of octets                                                             
  798.                                                                           
  799.                                                                                                                  
  800.                                                                                                         
  801.                                 Figure 1-4. Section 3
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808. 1.2.5 Section 4 - Data Section.
  809.  
  810.  
  811.  
  812.  
  813.                C O N T I N U O U S  B I N A R Y  S T R E A M
  814.  
  815.  
  816.                                  section
  817.                                     
  818.                                     0
  819.                                   section
  820.  
  821.                                      1
  822.                                   section
  823.  
  824.                                      2
  825.                                   section
  826.  
  827.                                      3
  828.                                   SECTION
  829.  
  830.                                      4
  831.                                   section
  832.  
  833.                                      5
  834.  
  835.  
  836. Octet No.      Contents
  837.  
  838. 1 - 3          Length of section, in octets
  839.  
  840.     4          set to zero (reserved)
  841.  
  842.     5          Binary data as defined by descriptors which begin  
  843.                at octet 8, Section 3.  
  844.  
  845. 1.2.6 Section 5 - End Section.
  846.  
  847.  
  848.  
  849.  
  850.                C O N T I N U O U S  B I N A R Y  S T R E A M
  851.  
  852.  
  853.                                  section
  854.                                     
  855.                                     0
  856.                                   section
  857.  
  858.                                      1
  859.                                   section
  860.  
  861.                                      2
  862.                                   section
  863.  
  864.                                      3
  865.                                   section
  866.  
  867.                                      4
  868.                                   SECTION
  869.  
  870.                                      5
  871.  
  872.  
  873. Octet No.      Contents
  874.  
  875. 1 - 4          "7777" (coded according to the CCITT International 
  876.                Alphabet No. 5)
  877.  
  878. 1.2.7 Required Entries.  In any BUFR message there will be a
  879. minimum number of bits to represent even the smallest amount of
  880. data.
  881.  
  882.  
  883.  
  884.  
  885.                C O N T I N U O U S  B I N A R Y  S T R E A M
  886.  
  887.  
  888.                                  section
  889.                                     
  890.                                     0
  891.                                  64 bits
  892.                                   section
  893.  
  894.                                      1
  895.                                  144 bits
  896.                                   section
  897.  
  898.                                      2
  899. (optional)
  900.  
  901.                                   section
  902.  
  903.                                      3
  904.                                   80 bits
  905.                                   section
  906.  
  907.                                      4
  908.                                   48 bits
  909.                                   section
  910.  
  911.                                      5
  912.                                   32 bits
  913.  
  914. └──────────────────────────────┬───────────────────────────────┘
  915.                                 
  916.                             368 bits
  917.  
  918. The required entries for each section are:
  919.  
  920.      Section 0 -    octets 1 -  8
  921.  
  922.      Section 1 -    octets 1 - 18
  923.  
  924.      Section 2 -    optional, but if included, octets 1 - 4 are 
  925.                     required with any information to begin in octet
  926.                     5. 
  927.  
  928.      Section 3 -    octets 1 - 7  The data descriptors begin in
  929.                     octet 8.  A single data descriptor occupies 16
  930.                     bits, or 2 octets.  Since the section must
  931.                     contain an even number of octets, there will be
  932.                     a minimum of 10 octets in the section 3.
  933.                     Section 3 will always conclude with 8 bits set
  934.                     to zero since all descriptors are 16 bits in
  935.                     length and the first descriptor begins in octet
  936.  8.
  937.  
  938.      Section 4 -    octets 1 - 4  The data begins in octet 5. 
  939.                     Since the section must contain an even number
  940.                     of octets there must be at least 2 octets after
  941.                     octet 4.
  942.  
  943.      Section 5 -    octets 1 - 4
  944.  
  945. Figure 1-8 is the same BUFR message as in Figures 1-1 to 1-7.  The
  946. shaded areas in Figure 1-8 are those octets which are required in
  947. any BUFR message.  Not included in the shaded areas are descriptors
  948. contained in octets 8 - 14 of Section 3 and the data in Octets 5 -
  949. 8 of section 4.
  950.  
  951. 1.2.8 BUFR and Data Management.  Sections 3 and 4 of BUFR contain
  952. all of the information necessary for defining and representing
  953. data.  The remaining sections are defined and included purely as
  954. aids to data management.  Key information within these sections is
  955. available from fixed locations relative to the start of each
  956. section.  It is thus possible to categorize and classify the main
  957. attributes of BUFR data without decoding the data description in
  958. Section 3, and the data in Section 4.
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.         OCTET NO.           1        2        3        4        5        6        7        8                     
  977.                                                                                                                  
  978. BINARY          01000000 00000000 00001000 00000000 10010000 11110101 11011100 01000000                          
  979.                                                 │                                 │                      
  980. HEXADECIMAL       0   0    0   0    0   8    0   0  └────────────────┬────────────────┘                          
  981.                                                                  │                                        DECODED 
  982.                               8        0     data as described by descriptors                                    
  983.                           │        │        in Section 3 (Figure 1-6)                                            
  984. length of section ────┘        │                                                                                 
  985.               reserved ────┘                                                                                     
  986.                                                                                                                  
  987.                                                                                                                  
  988.                                                                      Figure 1-5. Section 4   
  989.  
  990.  
  991.                  
  992.         OCTET NO.               5                6                7                8                             
  993.                                                                                                                  
  994. BINARY          1 0 0 1 0 0 0 0  1 1 1 1 0 1 0 1  1 1 0 1 1 1 0 0  0 1 0 0 0 0 0 0                               
  995.             │           │ │                   │ │                      │ │   │                           
  996. HEXADECIMAL     └──── 48 ───┘ └─────── 1EB ───────┘ └────────── B88 ───────┘ └─┬─┘                               
  997.                                                                            │                              DECODED 
  998.              72               491                      2952           │                                          
  999.                                     3 bits of zero to end octet ──┘                                              
  1000.                                                                                                                  
  1001.                                                                                                                  
  1002.                                                                              Figure 1-6. Section 4 data as
  1003. described by descriptors
  1004.  
  1005.  
  1006.                                                                                                                  
  1007.     OCTET NO.           1        2        3        4                                                             
  1008.                                                                                                               BINARY 
  1009.         00110111 00110111 00110111 00110111                                                                      
  1010.                                                                                                   HEXADECIMAL    
  1011.   3   7    3   7    3   7    3   7                                                                               
  1012.                                                                                           DECODED              7 
  1013.       7        7        7                                                                                        
  1014.                                                                                                                  
  1015.                                                                       Figure 1-7. Section 5
  1016.                                      
  1017.  
  1018.                                            end of section 0 ───┐
  1019. 01000010010101010100011001010010000000000000000000110100000000100
  1020.  
  1021.  
  1022. 00000000000000000010010000000000000000000111000000000000000000000
  1023.  
  1024.  
  1025. 00001000000000000000100000000101011101000001000001110100001100000
  1026.  
  1027.             ┌── end of section 1
  1028. 00000000000000000000000000000000011100000000000000000000000011000
  1029.  
  1030.                                         end of section 3 ──┐
  1031. 00000000000100000001000000010000001000001100000001000000000001000
  1032.     │  8       9       10      11      12      13      14  │
  1033.     └────────────────────── octets ────────────────────────┘
  1034.  
  1035.                                        end of section 4 ──┐
  1036. 00000000000000010000000000010010000111101011101110001000000001101 
  1037.                            │  5       6      7        8   │ 
  1038.                            └────────── octets ────────────┘ 
  1039.                             
  1040.       end of section 5 ──┐ 
  1041. 11001101110011011100110111                                        
  1042.  
  1043.  
  1044.            Figure 1-8. Required entries in sample BUFR message                                  CHAPTER 2
  1045.  
  1046.                                 BUFR Tables
  1047.  
  1048. 2.1 Introduction.  BUFR employs 3 types of tables: BUFR tables,
  1049. code tables and flag tables.
  1050.  
  1051. The tables in BUFR that contain information to describe, classify
  1052. and define the contents of a BUFR message are called BUFR tables. 
  1053. There are 4 tables defined: Tables A, B, C and D.
  1054.  
  1055. 2.2 TABLE A - Data Category.  Table A is referred to in Section 1
  1056. and provides a quick check for the type of data represented in
  1057. the message.  Of the 256 possible entries for Table A, 17 are
  1058. currently defined: 
  1059.  
  1060.                   Table 2-1. BUFR TABLE A - DATA CATEGORY
  1061.  
  1062.    Code Figure             Meaning
  1063.  
  1064.         0       Surface data - land
  1065.         1       Surface data - sea
  1066.         2       Vertical soundings (other than satellite)
  1067.         3       Vertical soundings (satellite)
  1068.         4       Single level upper-air data (other than 
  1069.                 satellite)
  1070.         5       Single level upper-air data (satellite)
  1071.         6       Radar data
  1072.         7       Synoptic data
  1073.         8       Physical/chemical constituents
  1074.         9       Dispersal and transport
  1075.        10       Radiological data
  1076.        11       BUFR tables, complete replacement or update
  1077.        12       Surface data (satellite)
  1078.     13-19       Reserved
  1079.        20       Status information
  1080.        21       Radiances
  1081.     22-30       Reserved
  1082.        31       Oceanographic data
  1083.    32-100       Reserved
  1084.       101       Image data
  1085.   102-255       Reserved                                        
  1086.  
  1087. The setting of one of the code figures for Table A (Table 2-1) in
  1088. octet 9 of Section 1 is actually redundant.  The descriptors used
  1089. in Section 3 of a message define the data in Section 4,
  1090. regardless of the Table A code figure.  Decoding programs may
  1091. well reference Table A, finding it useful to have a general
  1092. classification of the data available prior to actually decoding
  1093. the information and passing it on to some subsequent application
  1094. program.                                 
  1095.  
  1096. 2.3 TABLE B - Classification of Elements.  Table B is referenced in
  1097. Section 3 of a BUFR message and contains descriptions of parameters
  1098. encoded in Section 4.  Table B entries, as described in the WMO
  1099. Manual On Codes, Volume 1, Part B, consist of 6 entities:
  1100.  
  1101.                a descriptor consisting of the 3 parts F X and Y
  1102.  
  1103.                element name
  1104.  
  1105.                units: basic (SI) units for the element
  1106.  
  1107.                scale: factor (equal to 10 to the power [scale]) by
  1108.                which the element has been multiplied prior to                   
  1109. encoding
  1110.  
  1111.                reference value: a number to be subtracted from the
  1112.                element, after scaling, (if any), and prior to                   
  1113. encoding                 
  1114.  
  1115.                data width, in bits, the element requires for                    
  1116. representation in Section 4
  1117.  
  1118. A Table B descriptor consists of 16 bits (2 octets) divided into 3
  1119. parts, F, X and Y.
  1120.  
  1121.                  ┌────────┬────────┬─────────┐  
  1122.                  │        │        │         │ 
  1123.                  │   F    │   X    │   Y     │ 
  1124.                  │        │        │         │ 
  1125.                  │ 2 bits │ 6 bits │ 8 bits  │ 
  1126.                  └────────┴────────┴─────────┘ 
  1127.  
  1128. F (2 bits) indicates the type of descriptor.  In 2 bits there are
  1129. 4 possibilities, 0, 1, 2 and 3.  The numeric value of the 2 bit
  1130. quantity F, indicates the type of descriptor.
  1131.  
  1132.                F = 0  Element descriptor   (Table B entry)
  1133.                F = 1  Replication operator
  1134.                F = 2  Operator descriptor  (Table C entry)
  1135.                F = 3  Sequence descriptor  (Table D entry)
  1136.  
  1137. X (6 bits) indicates the class or category of descriptor.  There
  1138. are 64 possibilities, classes 00 to 63. Thus far, 28 classes have
  1139. been defined.
  1140.  
  1141. Y (8 bits) indicates the entry within an X class.  8 bits will
  1142. yield 256 possibilities within each of the 64 classes.  There are
  1143. a varying number of entries within each of the 28 classes that are
  1144. currently defined.
  1145.  
  1146. It is the F X Y descriptors in Section 3 that refer to data
  1147. represented in Section 4.  The 16 bits of F X and Y are not to be
  1148. treated as a 16 bit numeric value, but rather as 16 bits divided
  1149. into 3 parts, where each part (F, X and Y) are in themselves 2, 6
  1150. and 8 bit numeric values.  Some examples of descriptors with their
  1151. corresponding bit settings:
  1152.  
  1153.               Descriptor        F   X       Y
  1154.                0 01 001        00 000001 00000001 (Figure 1-4)
  1155.                1 02 006        01 000010 00000110
  1156.                2 01 131        10 000001 10000011
  1157.                3 07 002        11 000111 00000010             
  1158.  
  1159. If the following descriptors were contained in Section 3:
  1160.  
  1161.       0 01 001   0 01 002   0 02 001   0 04 001   0 04 002
  1162.       0 04 003   0 04 004   0 04 005   0 05 002   0 06 002
  1163.  
  1164. these descriptors would refer to the following extracts from BUFR
  1165. Table B:
  1166.  
  1167. Table     Element              Units    Scale  Reference Data Width
  1168. Reference   Name                                 Value     (Bits)
  1169. F  X  Y
  1170.  
  1171. 0 01 001  WMO block number    numeric     0        0         7
  1172. 0 01 002  WMO station number  numeric     0        0        10
  1173. 0 02 001  Type of station     code table  0        0         2
  1174. 0 04 001  Year                Year        0        0        12
  1175. 0 04 002  Month               Month       0        0         4
  1176. 0 04 003  Day                 Day         0        0         6
  1177. 0 04 004  Hour                Hour        0        0         5
  1178. 0 04 005  Minute              Minute      0        0         6
  1179. 0 05 002  Latitude            Degree      2    -9000        15
  1180.           (coarse accuracy)
  1181. 0 06 002  Longitude           Degree      2   -18000        16
  1182.           (coarse accuracy)
  1183.  
  1184. The element name is a plain language description of the element
  1185. entry of the table.
  1186.  
  1187. The units of Table B entries refer to the format of how the data in
  1188. Section 4 is represented.  The data may be numeric as in the case
  1189. of a WMO block number, character data as in the case of an aircraft
  1190. identifier.  When data is in character form, the character
  1191. representation is always according to the CCITT International
  1192. Alphabet No. 5.  The units may also refer to a code or flag table,
  1193. where the code or flag table is described in the WMO Manual On
  1194. Codes using as the code or flag table number the same number as the
  1195. F X Y descriptor.  Other units are in Standard International (SI)
  1196. units, such as meters or degrees Kelvin.
  1197.  
  1198. The scale refers to the power of 10 that the element in Section 4
  1199. has been multiplied by in order to retain the desired precision in
  1200. the transmitted data.  For example, the units of latitude are whole
  1201. degrees in Table B.  But this is not precise enough for most
  1202. usages, therefore the elements are to be multiplied by 100 (10^2)
  1203. so that the transmitted precision will be centidegrees, a more
  1204. useful precision.  On the other hand, the (SI) unit of pressure in
  1205. Table B is Pascals, a rather small unit that would result in
  1206. unnecessarily precise numbers being transmitted.  The BUFR Table B
  1207. calls for pressure to be divided by 10 (10^-1) resulting in a
  1208. transmitted unit of 10ths of hPa, or tenths of millibars, a more
  1209. reasonable precision for meteorological usage.  These precisions
  1210. can be changed on the fly, so to speak, if the table values are not
  1211. appropriate in special cases.  This is done through the use of
  1212. "operator descriptors" - see below, 2.4 Table C.
  1213.  
  1214. The reference value is a value that is to be subtracted from the
  1215. data after multiplication by the scale factor, if any, before
  1216. encoding into Section 4 in order to produce, in all cases, a
  1217. positive value.  In the case of latitude and longitude, south
  1218. latitude and west longitude are negative before applying the
  1219. reference value.  If, for example, a position of 35.50 degrees
  1220. south latitude were being encoded, multiplying -35.50 by 100 (scale
  1221. of 2) would produce -3550.  Subtracting the reference value -9000
  1222. would give 5450 that would be encoded in Section 4.  To obtain the
  1223. original value in decoding Section 4, adding back the -9000
  1224. reference value to 5450 would result in -3550, then dividing by the
  1225. scale (100) would obtain -35.50.   
  1226.  
  1227. The data width of Table B entries is a count of how many bits the
  1228. largest possible value of an individual data item of Section 4
  1229. occupies.
  1230.  
  1231. In those instances where a Table B descriptor defines an element of
  1232. data in Section 4, where that element is missing for a given
  1233. subset, then all bits for that element will be set to 1's in
  1234. Section 4.
  1235.  
  1236. Obviously, without an up-to-date Table B, a decoder program would
  1237. not be able to determine the form or content of data appearing in
  1238. Section 4.
  1239.  
  1240. 2.3.1 Data Replication.  A special descriptor called the
  1241. replication operator (F = 1) is used to define a range of
  1242. subsequent descriptors, together with a replication factor.  This
  1243. enables the appropriate descriptors to be considered to be repeated
  1244. a number of times.  In general for data replication, X indicates
  1245. the number of immediately following descriptors that are to be
  1246. replicated as a repeated set, and Y indicates the total number of
  1247. replications.  This, of course, implies, that the same pattern will
  1248. be found in Section 4, the data section.  This ability to describe
  1249. a repeated pattern in the data by a single set of descriptors
  1250. contributes to the efficiency of BUFR.
  1251.  
  1252. As an example, consider the following sequence appears in Section
  1253. 3:
  1254.                       1 02 006   0 07 004   0 01 003
  1255.  
  1256. the meaning of 1 02 006 is that the next 2 descriptors are
  1257. repeated 6 times, or the equivalent set of descriptors:           
  1258.  
  1259. 0 07 004   0 01 003   0 07 004   0 01 003   0 07 004  0 01 003 
  1260. 0 07 004   0 01 003   0 07 004   0 01 003   0 07 004  0 01 003
  1261.  
  1262. A special form of the replication operator allows the replication
  1263. factor to be stored with the data in Section 4, rather than with
  1264. the descriptor in Section 3.  This special form is called delayed
  1265. replication.  It is indicated by Y = 0.  It allows the data to be
  1266. described in a general way, with the number of replications being
  1267. different from subset to subset.  Since the data now contains an
  1268. additional data element, the actual replication count, a
  1269. descriptor must be added to Section 3 to account for, and
  1270. describe, this (special) data element.  The appropriate
  1271. descriptor is found in Class 31.  Special note: the 0 31 YYY
  1272. (delayed replication factor) descriptor follows immediately after
  1273. the 1 X 000 (delayed replication) descriptor but is NOT included
  1274. in the count (X) of the following descriptors to be replicated.
  1275.  
  1276. Another form of delayed replication enables both the data
  1277. description and the corresponding data item or items to be
  1278. repeated.  Entries in Class 31 of Table B are used in association
  1279. with the delayed replication operator to enable this to be done.
  1280.  
  1281. 2.4 Table C - Data Description Operators.  Table C data
  1282. description operators (Chapter 5) are used when there is a need
  1283. to redefine Table B attributes temporarily, such as the need  to
  1284. change data width, scale or reference value of a Table B entry. 
  1285. Table C is also used to add associated fields such as quality
  1286. control information, indicate characters as data items, and
  1287. signify data width of local descriptors.
  1288.  
  1289. 2.5 Table D - Lists of Common Sequences.  Table D contains
  1290. descriptors which describe additional descriptors.  A single
  1291. descriptor used in Section 3 with F = 3 is a pointer to a Table D
  1292. entry which contains other descriptors.  If the Table D
  1293. descriptor 3 01 001 were used in Section 3, the expansion of that
  1294. descriptor is two Table B descriptors, 0 01 001 and 0 01 002.
  1295.  
  1296.                        ┌ 0 01 001 ───WMO block number
  1297.           3 01 001─────┤
  1298.                        └ 0 01 002 ───WMO station number
  1299.  
  1300. Table D descriptors may also refer to an expansion list of
  1301. descriptors that contain additional Table D descriptors.  The
  1302. descriptor 3 01 025 expands to 3 01 023, 0 04 003 and 3 01 012.  In
  1303. the expansion, 3 01 023 additionally expands to 0 05 002 and 0 06
  1304. 002.  The remaining descriptor 3 01 012 expands to 0 04 004 and 0
  1305. 04 005.  Thus, the single Table D descriptor 3 01 025 expands to a
  1306. total of 5 separate Table B entries.
  1307.  
  1308.                                      ┌ 0 05 002 ───Latitude
  1309.                        ┌ 3 01 023────┤       
  1310.                        │             └ 0 06 002 ───Longitude
  1311.                        │
  1312.                        │
  1313.           3 01 025─────┤ 0 04 003──────────────────Day            
  1314.                        │
  1315.                        │
  1316.                        │
  1317.                        │             ┌ 0 04 004 ───Hour
  1318.                        └ 3 01 012────┤       
  1319.                                      └ 0 04 005 ───Minute
  1320.  
  1321. The order of the data in Section 4 is then according to the
  1322. following sequence of Table B entries: 0 05 002  0 06 002 0 04 003 
  1323. 0 04 004  0 04 005.
  1324.  
  1325. There are currently defined 19 categories of common sequences in
  1326. Table D (Table 2-2).
  1327.  
  1328.              Table 2-2. BUFR Table D list of common sequences
  1329.  
  1330.      F   X         CATEGORY OF SEQUENCES
  1331.  
  1332.      3  00     BUFR table entries sequences
  1333.      3  01     Location and identification sequences
  1334.      3  02     Meteorological sequences common to surface data
  1335.      3  03     Meteorological sequences common to vertical 
  1336.                sounding data
  1337.      3  04     Meteorological sequences common to satellite 
  1338.                observations
  1339.      3  05     Reserved
  1340.      3  06     Meteorological or oceanographic sequences common
  1341.                to oceanographic observations
  1342.      3  07     Surface report sequences (land)
  1343.      3  08     Surface report sequences (sea)
  1344.      3  09     Vertical sounding sequences (conventional data)
  1345.      3  10     Vertical sounding sequences (satellite data)
  1346.      3  11     Single level report sequences (conventional data)
  1347.      3  12     Single level report sequences (satellite data)
  1348.      3  13     Sequences common to image data
  1349.      3  14     Reserved
  1350.      3  15     Oceanographic report sequences
  1351.      3  16     Synoptic feature sequences
  1352.      3  18     Radiological report sequences
  1353.      3  21     Radar report sequences
  1354.  
  1355. Any BUFR message may be encoded without using Table D.  The data
  1356. description contained within Section 3 can be accomplished entirely
  1357. by using only element descriptors of Table B and operator
  1358. descriptors of Table C.  To do so, however would involve
  1359. considerable overhead in terms of the length of the Section 3 data
  1360. description.  The use of Table D is another major contributor to
  1361. the efficiency of BUFR.
  1362.  
  1363. 2.6 Message Layout.  Figure 2-1 illustrates how the single
  1364. descriptor 3 07 002 expands into 2 more Table D descriptors, 3 01
  1365. 032 and 3 02 011.  The descriptor 3 01 032 further expands into 5
  1366. more descriptors 3 01 001, 0 02 001, 3 01 011, 3 01 012 and 3 01
  1367. 024.  As is shown in Figure 2-1, descriptors in Table D may
  1368. themselves refer to Table D, provided no circularity results on
  1369. repeated expansion.  Completion of the expansion process leads to
  1370. a total of 31 Table B descriptors.  The 16 bits in Section 3 taken
  1371. by the descriptor 3 07 002 results in a savings of 480 bits (30 x
  1372. 16 bits) over what the 31 Table B descriptors would occupy in bits.
  1373.  
  1374. Table D has been limited to lists of descriptors likely to be most
  1375. frequently used.  Table D was not designed to be comprehensive of
  1376. all sequences likely to be encountered.  To do so would require an
  1377. excessively large Table D and would reduce considerably flexibility
  1378. when encoding minor differences in reporting practices.  More
  1379. flexibility is retained if the Data Description Section contains
  1380. several descriptors.
  1381.  
  1382. A complete layout of a BUFR message containing just 1 surface
  1383. observation is illustrated in Figure 2-2.  As indicated in octets
  1384. 5-7 of Section 1, there are a total of 78 octets in the message, or
  1385. 624 bits.  Of the 624 bits, 267 are for the actual parameters of
  1386. data (Figure 2-1) and the remaining 357 bits are BUFR overhead. 
  1387. BUFR overhead in this context is the number of bits that are not
  1388. actual surface data.  In this example there are more bits used for
  1389. the overhead than for the surface data.  
  1390.  
  1391. Figure 2-3 is a complete layout of a BUFR message containing the
  1392. maximum number of 448 subsets to fit within the 15000 octet limit.
  1393. This message would contain 14996 octets or 119968 bits.  Of these
  1394. 119968 bits, 119616 are data and 352 bits are BUFR overhead.  The
  1395. 5 bit difference in overhead from Figure 2-2 (357 bits) and Figure
  1396. 2-3 (352 bits) is due to the number of bits set to 0 at the end of
  1397. Section 4 in order to complete the section at the end of an even
  1398. numbered octet.  For 1 subset of 267 bits, 5 additional bits are
  1399. needed to complete the octet.  For 448 subsets, or 119616 bits, no
  1400. additional bits are needed to complete the last octet. 
  1401.  
  1402. 2.6.1 Comparison of BUFR and Character Code Bit Counts.  The
  1403. surface observations illustrated in Figures 2-1 to 2-3 are the
  1404. equivalent of the following parameters in the WMO code form FM
  1405. 12-IX Ext. SYNOP:
  1406.  
  1407.      YYGGiw IIiii iRixhVV  Nddff 1snTTT 2snTdTdTd 3PoPoPoPo
  1408.      4PPPP 5appp 7wwW1W2 8NhCLCMCH
  1409.  
  1410. Data encoded in this form would consist of 55 characters plus 10
  1411. spaces between each group of 5 characters for a total of 65
  1412. characters.  For transmission purposes these 65 characters would
  1413. require a total number of 520 bits (65 X 8 bits per character).  A
  1414. complete BUFR message with 1 observation (Figure 2-2) requires 78
  1415. octets or 624 bits, 104 more than the corresponding character
  1416. representation.  Of these 624 bits, 267 are taken by the surface
  1417. observation and 357 as BUFR overhead.  If, however, 448
  1418. observations in character form were transmitted, the total number
  1419. of bits would be 232960 (520 X 448).  The corresponding BUFR
  1420. representation (Figure 2-3) would require 14996 octets, or 119968
  1421. bits, a savings of 112992 bits over the character representation. 
  1422. The 112992 bits is equivalent to 217 observations in character form
  1423. or 423 observations in BUFR, not counting the BUFR overhead.  While
  1424. these numbers may be viewed in different ways, the real
  1425. significance is that BUFR is far more efficient, in terms of number
  1426. of bits to represent a meteorological observation, than character
  1427. forms.
  1428.                                                                   SECTION 4
  1429.                                                               WIDTH IN BITS
  1430.  
  1431.                              ┌0 01 001───WMO BLOCK NO.──────────────────    7
  1432.                    ┌3 01 001─┴0 01 002───WMO STATION NO.────────────────   10
  1433.                    │
  1434.                    │0 02 001 ────────────TYPE OF STATION────────────────    2
  1435.                    │
  1436.          ┌3 01 032 ┤         ┌0 04 001───YEAR───────────────────────────   12
  1437.          │         │3 01 011 ┤0 04 002 ──MONTH──────────────────────────    4
  1438.          │         │         └0 04 003 ──DAY────────────────────────────    6
  1439.          │         │         ┌0 04 004 ──HOUR───────────────────────────    5
  1440.          │         │3 01 012 ┴0 04 005 ──MINUTE ────────────────────────    6
  1441.          │         │
  1442.          │         │         ┌0 05 002 ──LATITUDE (COURSE ACCURACY) ────   15
  1443.          │         └3 01 024 ┤0 06 002 ──LONGITUDE (COURSE ACCURACY) ───   16
  1444.          │                   └0 07 001───HEIGHT OF STATION ─────────────   15
  1445.          │                                                                   
  1446.          │                   ┌0 10 004 ──PRESSURE ──────────────────────   14
  1447. 3 07 002 ┤         ┌3 02 001 ┤0 10 051 ──PRESSURE REDUCED TO MSL ───────   14
  1448.          │         │         │0 10 061 ──3 HR PRESSURE CHANGE ──────────   10
  1449.          │         │         └0 10 063 ──CHARACTERISTIC OF PRESSURE ────    4
  1450.          │         │                                                         
  1451.          │         │         ┌0 11 011   WIND DIRECTION ────────────────    9
  1452.          │         │         │0 11 012   WIND SPEED AT 10m ─────────────   12
  1453.          │         │         │0 12 004   DRY BULB AT 2m ────────────────   12
  1454.          │         │         │0 12 006   DEW POINT TEMP AT 2m ──────────   12
  1455.          │         │3 02 003─┤0 13 003   RELATIVE HUMIDITY ─────────────    7
  1456.          │         │         │0 20 001   HORIZONTAL VISIBILITY ─────────   13
  1457.          │         │         │0 20 003   PRESENT WEATHER ───────────────    8
  1458.          │         │         │0 20 004   PAST WEATHER (1) ──────────────    4
  1459.          │         │         └0 20 005   PAST WEATHER (2) ──────────────    4
  1460.          └3 02 011 │         ┌0 20 010   CLOUD COVER (TOTAL) ───────────    7
  1461.                    │         │0 08 002   VERTICAL SIGNIFICANCE           
  1462.                    │         │           SURFACE OBS ───────────────────    6
  1463.                    │         │0 20 011   CLOUD AMOUNT ──────────────────    4
  1464.                    └3 02 004 ┤0 20 013   HEIGHT OF BASE OF CLOUD ───────   11
  1465.                              │0 20 012   CLOUD TYPE C1 ─────────────────    6
  1466.                              │0 20 012   CLOUD TYPE Cm ─────────────────    6
  1467.                              └0 20 012   CLOUD TYPE Ch ─────────────────    6
  1468.                                                                            ── 
  1469.                                                               TOTAL BITS  267
  1470.  
  1471.         Figure 2-1. Example of surface observations sequence using
  1472.                         Table D descriptor 3 07 002
  1473.                 Section     Octet in    Encoded
  1474.                 Octet No.   Message      Value   Description
  1475.  
  1476. Section 0 
  1477. (indicator          1-4       1-4       BUFR encoded international CCITT
  1478. section)                                Alphabet No. 5
  1479.                5-7       5-7       78   total length of message (octets)
  1480.                  8         8        2   BUFR edition number   
  1481. Section 1
  1482. (identification     1-3       9-11      18   length of section (octets)
  1483. section)         4        12        0   BUFR master table
  1484.                5-6      13-14      58   originating center (U.S. Navy -
  1485.                                         FNOC)
  1486.                  7        15        0   update sequence number
  1487.                  8        16        0   indicator that Section 2 not
  1488.                                         included
  1489.                  9        17        0   Table A - surface land data
  1490.                 10        18        0   BUFR message sub-type
  1491.                 11        19        2   version number of master tables
  1492.                 12        20        0   version number of local tables
  1493.                 13        21       92   year of century
  1494.                 14        22        4   month
  1495.                 15        23       18   day
  1496.                 16        24        0   hour
  1497.                 17        25        0   minute
  1498.                 18        26        0   reserved for local use by ADP
  1499.                                         centers (also needed to complete
  1500.                                         even number of octets for section
  1501. Section 3
  1502. (Data               1-3      27-29      10   length of section (octets)
  1503. description           4        30        0   reserved 
  1504. section)       5-6      31-32       1   number of data subsets
  1505.                  7        33        bit 1=1  flag indicating observed data
  1506.                8-9      34-35   3 07 002     Table D descriptor for surface
  1507.                                         land in F X Y format
  1508.                 10        36        0   need to complete section with an
  1509.                                         even number of octets
  1510. Section 4       
  1511. (Data               1-3      37-39      38   length of section (octets)
  1512. section)         4        40        0   reserved
  1513.                5-38     41-74     data  continuous bit stream of
  1514.                                         data for 1 observations, 267 bits
  1515.                                         plus 5 bits to end on even octet
  1516.                                         (see Figure 2-1 for expansion)
  1517. Section 5
  1518. (End section)  1-4      75-78     7777  encoded CCITT International
  1519.                                         Alphabet No. 5
  1520.  
  1521. Figure 2-2. BUFR message of 1 surface observation using Table D
  1522. descriptor 3 07 002
  1523.                                                               Section      Octet in   Encoded
  1524.                Octet No.    Message    Value    Description
  1525.  
  1526. Section 0 
  1527. (indicator          1-4       1-4       BUFR encoded international CCITT
  1528. section)                                Alphabet No. 5
  1529.                5-7       5-7       14996     total length of message (octets)
  1530.                  8         8          2 BUFR edition number            
  1531. Section 1
  1532. (identification     1-3       9-11        18 length of section (octets)
  1533. section)         4        12          0 BUFR master table
  1534.                5-6      13-14        58 originating center (U.S. Navy -
  1535.                                         FNOC)
  1536.                  7        15          0 update sequence number         
  1537.                  8        16          0 indicator that Section 2 not  
  1538.                                         included
  1539.                  9        17          0 Table A - surface land data
  1540.                 10        18          0 BUFR message sub-type
  1541.                 11        19          2 version number of master table
  1542.                 12        20          0 version number of local tables
  1543.                 13        21         92 year of century
  1544.                 14        22          4 month
  1545.                 15        23         18 day
  1546.                 16        24          0 hour
  1547.                 17        25          0 minute
  1548.                 18        26          0 reserved for local use by ADP
  1549.                                         centers (also needed to complete
  1550.                                         even number of octets for section 
  1551. Section 3
  1552. (Data               1-3      27-29        10 length of section (octets)
  1553. description           4        30          0 reserved 
  1554. section)       5-6      31-32       448 number of data subsets
  1555.                  7        33     bit 1=1     flag indicating observed data
  1556.                8-9      34-35   3 07 002     Table D descriptor for surface
  1557.                                         land in F X Y format
  1558.                 10        36          0 need to complete section with an
  1559.                                         even number of octets
  1560. Section 4       
  1561. (Data               1-3      37-39      14956     length of section (octets)
  1562. section)         4        40          0 reserved
  1563.             5-14956  41-14992      data continuous bit stream of data for
  1564.                                         448 observations, 267 bits per
  1565.                                         observation with no added bits
  1566.                                         to end on an even octet 
  1567. Section 5
  1568. (End section)  1-4 14993-14996           7777     encoded CCITT International
  1569.                                         Alphabet No. 5
  1570.  
  1571.     Figure 2-3. BUFR message of 448 surface observations using Table  
  1572.                          D descriptor 3 07 002
  1573.  
  1574. 2.7 Code Tables and Flag Tables.  Since some meteorological
  1575. parameters are qualitative or semi-qualitative, they are best
  1576. represented with reference to a code table.
  1577.  
  1578. 2.7.1 Code Tables.  BUFR code tables and flag tables refer to
  1579. elements defined within BUFR Table B.  They are numbered according
  1580. to the X and Y values of the corresponding Table B reference.  For
  1581. example, the Table B entry 0 01 003, WMO Region number,
  1582. geographical area, indicates in the Unit column that this is a BUFR
  1583. code table, the number of that code table being 0 01 003.  
  1584.  
  1585. Many of the code tables that have been included in the BUFR
  1586. specification are similar to existing WMO code tables for
  1587. representing character data.  Attachment II of the WMO Manual on
  1588. Codes, Volume 1, Part B is a list of the code tables associated
  1589. with BUFR Table B and the existing specifications and code tables
  1590. of the WMO Manual on Codes, Volume 1, Part A.
  1591.  
  1592. There is not a one-to-one BUFR code table relationship to the
  1593. character code tables.  The character Code Table 3333, Quadrant of
  1594. the Globe, for example, has no meaning in BUFR, as all points on
  1595. the globe in BUFR are completely expressed as latitude and
  1596. longitude values.  
  1597.  
  1598. 2.7.2 Flag tables.  In a flag table, each bit indicates an item of
  1599. significance.  A bit set to 1 indicates an item is included, or is
  1600. true, while a bit set to 0 indicates omission, or false.  In any
  1601. flag table, when all bits are set it is an indication of a missing
  1602. value.  Flag tables additionally enable combinations to be
  1603. identified.  In all flag tables within the BUFR specification, bits
  1604. are numbered from 1 to N from most significant to least significant
  1605. within a data width of N bits, i.e., from left (bit 1) to right
  1606. (bit N).
  1607.  
  1608. 2.7.3 Flags.  Flags, without reference to a flag table, are also
  1609. used within Sections 1 and 3 of a BUFR message.  In Section 1,
  1610. octet 8, if bit 1 = 0 this is an indication that the optional
  1611. section 2 is not contained within the message.  If bit 1 = 1, then
  1612. Section 2 is included.
  1613.  
  1614.  
  1615.       Section 1                      Section 1
  1616.        Octet 8                        Octet 8
  1617.                   
  1618.       00000000                       10000000 
  1619.       │                              │
  1620.       └ Section 2 not included       └ Section 2 included 
  1621.  
  1622.  
  1623.  
  1624. Similarly, the two flag bits in Section 3, octet 7 have these
  1625. meanings:
  1626.  
  1627.       Section 3                      Section 3
  1628.        Octet 7                        Octet 7
  1629.       00000000                       11000000
  1630.       ││                             ││
  1631.       │└ non-compressed data         │└ compressed data
  1632.       │                              │
  1633.       └ other data                   └ observed data
  1634.        
  1635.  
  1636. 2.8 Local Tables.  Since a data processing center may need to
  1637. represent data conforming to a local requirement, and this data is
  1638. not defined within Table B, specific areas of Table B and D are
  1639. reserved for local use (Figure 2-4).  These areas are defined as
  1640. entries 192 to 255 inclusive of all classes.  Centers defining
  1641. classes or categories for local use should restrict their use to
  1642. the range 48 to 63 inclusive.
  1643.  
  1644.             
  1645.     0 ┌────────────────┬────────────────────────┬────────────┐
  1646.       │                │                        │            │
  1647.       │      For       │                        │     For    │
  1648.       │ International  │                        │    Local   │
  1649.       │      Use       │                        │     Use    │
  1650.       │                │                        │            │
  1651.    31 ├────────────────┘                        ├────────────┤    
  1652.       │                                         │            │
  1653.       │                   R e s e r v e d       │     For    │
  1654.       │                                         │    Local   │
  1655.       │                       F o r             │     Use    │
  1656.       │                                         │ (if needed)│
  1657.       │                  F u t u r e  U s e     │            │
  1658.       │                                         │            │ 
  1659.    48 │─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ │
  1660.       │                                         │            │
  1661.       │                                         │     For    │
  1662.       │        For Local Use (if needed)        │    Local   │
  1663.       │                                         │     Use    │
  1664.    63 └─────────────────────────────────────────┴────────────┘
  1665.       0               63                       192          255
  1666.  
  1667.                       Figure 2-4. Table reservations
  1668.  
  1669. If a data processing center had multiple sources of data receipt,
  1670. for example, it may be necessary to indicate the source of an
  1671. observation by the circuit from which the data was received.  A
  1672. local Table B descriptor such as 
  1673.  
  1674. 0 54 192 could be used which may be a code table specifying
  1675. circuits of transmission.  The Table B entry could be:            
  1676.                 
  1677.  
  1678. Table      Element        Units   Scale    Reference   Data Width
  1679. Reference  Name                            Value          (Bits)
  1680.  
  1681. 0 54 192   Circuit     code table    0         0            3
  1682.                          
  1683.  
  1684. The corresponding local code table could be:
  1685.  
  1686.                      0 54 192
  1687.  
  1688.         Circuit designators for data receipt
  1689.  
  1690.    code figure       circuit  
  1691.       
  1692.         0            GTS  
  1693.         1            AWN  
  1694.         2            AUTODIN
  1695.         3            ANTARCTIC
  1696.        4-7           Reserved     
  1697.        
  1698. Using the same Table D descriptor, 3 07 002, as in Figure 2-1,
  1699. adding the local descriptor 0 54 192 would produce the expansion as
  1700. in Figure 2-5.  The following modifications would have to be made
  1701. to the BUFR message if the local descriptor 0 54 192 were to be
  1702. included in a message (Figure 2-6):
  1703.  
  1704.      Section 0, octets 5-7, the total length of the message,
  1705.      increases from 14996 octets to 14998 octets.
  1706.  
  1707.      Section 1, octet no. 12 (octet 20 within the message) would
  1708.      have the version number of the local tables in use.
  1709.  
  1710.      Section 3, octets 1-3, the encoded value would increase from
  1711.      10 octets to 12 octets.  If one descriptor were being added,
  1712.      the length of the section increases by 2 in order to keep the
  1713.      section an even number of octets.  Octets 5-6, number of data
  1714.      subsets decreases from 448 to 443.  The number of data subsets
  1715.      have been reduced to keep the total message length under the
  1716.      15000 octet maximum.
  1717.  
  1718.      Also in Section 3, the descriptors will occupy octets 8-11
  1719.      vice octets 8-9 to accommodate the added descriptor.
  1720.  
  1721. Note that in Section 4, octets 1-3, the encoded value for length of
  1722. section remains the same at 14956 octets.  The number of bits
  1723. needed for 448 subsets without a local descriptor is 119616 (448 X
  1724. 267), or exactly 14952 octets.  For 443 subsets with 3 bits added
  1725. to each subset for the local information, 119610 bits are needed
  1726. (443 X 270).  Adding 6 bits to complete the octet brings the total
  1727. bit count for all 443 subsets to 119616, the same number of bits as
  1728. 448 subsets without the added local information.
  1729.                                                                  
  1730.                                                                   SECTION 4
  1731.                                                                 WIDTH IN BITS
  1732.  
  1733. 0 54 192──────────────────────────────────── LOCAL DESCRIPTOR ───────────    3
  1734.  
  1735.                               ┌ 0 01 001 ─── WMO BLOCK NO. ──────────────    7
  1736.                   ┌3 01 001 ──┴ 0 01 002 ─── WMO STATION NO. ────────────   10
  1737.                   │
  1738.                   │0 02 001 ──────────────── TYPE OF STATION ────────────    2    
  1739.                │
  1740.         ┌3 01 032─┤           ┌ 0 04 001 ─── YEAR ───────────────────────   12    
  1741.      │         │3 01 011 ──┤ 0 04 002 ─── MONTH ──────────────────────    4
  1742.         │         │           └ 0 04 003 ─── DAY ────────────────────────    6
  1743.         │         │
  1744.         │         │           ┌ 0 04 004 ─── HOUR ───────────────────────    5
  1745.         │         │3 01 012 ──┴ 0 04 005 ─── MINUTE ─────────────────────    6
  1746.         │         │         
  1747.         │         │           ┌ 0 05 002 ─── LATITUDE (COARSE ACCURACY) ─   15
  1748.         │         └3 01 024 ──┤ 0 06 002 ─── LONGITUDE(COARSE ACCURACY) ─   16
  1749.         │                     └ 0 07 001 ─── HEIGHT OF STATION ──────────   15
  1750.         │          
  1751.         │                     ┌ 0 10 004 ─── PRESSURE ───────────────────   14
  1752. 3 07 002┤         ┌3 02 001 ──┤ 0 10 051 ─── PRESSURE REDUCED TO MSL ────   14
  1753.         │         │           │ 0 10 061 ─── 3 HR PRESSURE CHANGE ───────   10
  1754.         │         │           └ 0 10 063 ─── CHARACTERISTIC OF PRESSURE ─    4
  1755.         │         │           ┌ 0 11 011 ─── WIND DIRECTION ─────────────    9
  1756.         │         │           │ 0 11 012 ─── WIND SPEED AT 10m ──────────   12
  1757.         │         │           │ 0 12 004 ─── DRY BULB TEMP AT 2m ────────   12
  1758.         │         │           │ 0 12 006 ─── DEW POINT TEMP AT 2m ───────   12
  1759.         │         │3 02 003 ──┤ 0 13 003 ─── RELATIVE HUMIDITY ──────────    7
  1760.         │         │           │ 0 20 001 ─── HORIZONTAL VISIBILITY ──────   13
  1761.         │         │           │ 0 20 003 ─── PRESENT WEATHER ────────────    8
  1762.         │         │           │ 0 20 004 ─── PAST WEATHER (1) ───────────    4
  1763.         │         │           └ 0 20 005 ─── PAST WEATHER (2) ───────────    4
  1764.         │         │
  1765.         └3 02 011─┤           ┌ 0 20 010 ─── CLOUD COVER (TOTAL) ────────    7
  1766.                   │           │ 0 08 002 ─── VERTICAL SIGNIFICANCE
  1767.                   │           │              SURFACE OBS ────────────────    6
  1768.                   │           │ 0 20 011 ─── CLOUD AMOUNT ───────────────    4
  1769.                   └3 02 004 ──┤ 0 20 013 ─── HEIGHT OF BASE OF CLOUD ────   11
  1770.                               │ 0 20 012 ─── CLOUD TYPE Cl ──────────────    6
  1771.                               │ 0 20 012 ─── CLOUD TYPE Cm ──────────────    6
  1772.                               └ 0 20 012 ─── CLOUD TYPE Ch ──────────────    6
  1773.                                                                            ───    
  1774.                                                             TOTAL BITS  270
  1775.  
  1776.     Figure 2-5. Example of surface observations sequence using Table
  1777.                D descriptor 3 07 002 and local descriptor
  1778.                 Section    Octet in   Encoded
  1779.                Octet No.   Message    Value     Description
  1780. Section 0 
  1781. (indicator       1-4          1-4      BUFR   encoded international CCITT
  1782. section)                                      Alphabet No. 5
  1783.                  5-7          5-7     14998   total length of message (octets)
  1784.                    8           8         2   BUFR edition number             
  1785. Section 1                                                                
  1786. (identification  1-3         9-11        18   length of section (octets)
  1787. section)           4           12         0   BUFR master table
  1788.                  5-6        13-14        58   originating center (U.S. Navy       
  1789.                                            - FNOC)
  1790.                    7           15         0   update sequence number
  1791.                    8           16         0   indicator that Section 2 not  
  1792.                                               included
  1793.                    9           17         0   Table A - surface land data
  1794.                   10           18         0   BUFR message sub-type
  1795.                   11           19         2   version number of master tables
  1796.                   12           20         1   version number of local tables
  1797.                   13           21        92   year of century
  1798.                   14           22         4   month
  1799.                   15           23        18   day
  1800.                   16           24         0   hour
  1801.                   17           25         0   minute
  1802.                   18           26         0   reserved for local use by ADP 
  1803.                                               centers (also need to complete      
  1804.                                        even number of octets for Section
  1805.                                        3
  1806. (Data            1-3        27-29        12   length of section (octets)
  1807. description        4           30         0   reserved 
  1808. section)         5-6        31-32       443   number of data subsets
  1809.                    7           33   BIT 1=1   flag indicating observed data
  1810.                  8-11       34-37  0 54 192   local and Table D descriptors
  1811.                                    3 07 002   in F X Y format
  1812.                   10           38         0   need to complete section with                                            an
  1813. even number of octets
  1814. Section 4
  1815. (Data            1-3        39-41     14956   length of section (octets)
  1816. section)           4           42         0   reserved
  1817.              5-14956     43-14994      data   continuous bit stream of data
  1818.                                               for 443 observations, 270 bits
  1819.                                               per observation plus 6 bits to 
  1820.                                               end on even octet
  1821. Section 5
  1822. (End section)    1-4  14995-14998      7777   encoded CCITT international 
  1823.                                               Alphabet No. 5
  1824.  
  1825.  
  1826.  
  1827. Figure 2-6. BUFR message of 443 surface observations using 2
  1828. descriptors, local descriptor 0 54 192 and Table B descriptor 3
  1829. 07 002. CHAPTER 3
  1830.  
  1831. Using Data Replication
  1832.  
  1833. 3.1 Introduction.  When encoding a series of parameters a fixed
  1834. number of times for all reports represented in Section 4, it may be
  1835. possible to choose from one of several methods for using Section 3
  1836. descriptors.
  1837.  
  1838. 3.2 Data Replication Examples.  If there were 4 elements of cloud
  1839. information that were described by the Table B descriptors 0 08 002 
  1840. 0 20 011  0 20 012  0 20 013, and these elements were to be
  1841. repeated 4 times, these 16 total elements of data in Section 4 may
  1842. be described in the following ways:
  1843.  
  1844.      1. long and cumbersome method - each element described
  1845.         individually
  1846.  
  1847.            0 08 002   0 20 011   0 20 012   0 20 013
  1848.            0 08 002   0 20 011   0 20 012   0 20 013
  1849.            0 08 002   0 20 011   0 20 012   0 20 013
  1850.            0 08 002   0 20 011   0 20 012   0 20 013
  1851.  
  1852.      2. using the replication operator -
  1853.  
  1854.             1 04 004   0 08 002   0 20 011   0 20 012   0 20 013
  1855.  
  1856.         The meaning of the descriptor 1 04 004 is that the F        
  1857.       portion (1) is indicating this is a replication operator,   
  1858.       the X portion (04) means the following 4 descriptors are to 
  1859.         be repeated Y (004) times.
  1860.  
  1861.      3. combine replication operator and Table D descriptor
  1862.  
  1863.             1 01 004   3 02 005
  1864.  
  1865.         In this particular example of Table B descriptors there   
  1866.         is defined a Table D descriptor 3 02 005 which expands to 
  1867.         the 4 descriptors 0 08 002  0 20 011  0 20 012  0 20 013. 
  1868.         The replication operator 1 01 004 followed by 3 02 005    
  1869.         means the data in Section 4, defined by the Table D       
  1870.         descriptor 3 02 005, is repeated 4 times.
  1871.  
  1872. Using either a replication operator followed by a Table B
  1873. descriptor or a replication operator followed by a Table D
  1874. descriptor, if it exists, produces the same definition of data as
  1875. repeating Table B descriptors.  Note, in example 3, that the count
  1876. of the number of descriptors to be replicated (X, 01) applies to
  1877. the single Table D descriptor that is actually in the message, and
  1878. NOT to the set of possibly very many descriptors that the single
  1879. type 3 descriptor represents.
  1880.  
  1881. A special form of the replication operator allows the replication
  1882. factor to be stored with the data in Section 4, rather than with
  1883. the descriptor in Section 3.  This is particularly useful when
  1884. describing data such as TEMP or BATHY observations where the number
  1885. of levels differs from observation to observation.  The delayed
  1886. replication operator is of the form F X Y where F = 1, X indicates
  1887. how many descriptors are to be replicated, and Y = 000.  This
  1888. operator is to be followed by a Table B descriptor from Class 31. 
  1889. The Class 31 descriptor is not included in the count (X) of the
  1890. number of following descriptors to be replicated.  Thus, if the
  1891. following sequence of descriptors appeared in Section 3: 1 01 000 
  1892. 0 31 001  0 03 014, the meaning of these descriptors is:
  1893.  
  1894.       1 01 000     F = 1     replication operator
  1895.                    X = 01    1 descriptor is replicated, not 
  1896.                              counting, i.e. skipping over, the 
  1897.                              0 31 001 descriptor
  1898.                    Y = 000   delayed replication
  1899.                                              
  1900.         0 31 001   F = 0     Table B descriptor
  1901.                    X = 31    Class 31 - data description operator
  1902.                              qualifiers
  1903.                    Y = 001   delayed descriptor replication
  1904.                              factor
  1905.                              occupying 8 bits in Section 4 (Table 
  1906.                              B, Class 31 definition)
  1907.  
  1908.         3 03 014   F = 3     Table D descriptor
  1909.                    X = 03    Category 03 - meteorological        
  1910.                              sequences common to vertical
  1911.                              sounding data
  1912.                    Y = 014   entry 14 of Category 03
  1913.  
  1914. The Table D descriptor 3 03 014 expands into seven descriptors. 
  1915. The Section 4 data width for the expansion of 3 03 014 is 83 bits.
  1916.  
  1917.                                                                   Section 4
  1918.                                                                    Width in Bits
  1919.  
  1920.    1 01 000 ────────────────────────── Delayed Rep. 1 Descriptor────  0
  1921.    0 31 001 ────────────────────────── Replication Factor ──────────  8
  1922.              ┌ 0 07 004 ────────────── Pressure ──────────────────── 14┐
  1923.              │ 0 08 001 ────────────── Vertical Sounding Sig ───────  7│  
  1924.              │ 0 10 003 ────────────── Geopotential ──────────────── 17│
  1925.    3 03 014 ─┤ 0 12 001 ────────────── Temperature ───────────────── 12├  83
  1926.              │ 0 12 003 ────────────── Dew Point ─────────────────── 12│ bits
  1927.              │ 0 11 001 ────────────── Wind Direction ──────────────  9│
  1928.              └ 0 11 002 ────────────── Wind Speed ────────────────── 12┘
  1929.                                                                   
  1930. For each observation encoded into Section 4 the 8 bits preceding
  1931. the pressure data indicates how many times the following 7 elements
  1932. are replicated.          
  1933.  
  1934. Figure 3-1 is an example of TEMP observations sequence using a
  1935. single Table D descriptor which expands to include delayed
  1936. replication.  In this example, the replication factor indicates how
  1937. many levels are contained within the observation.  The bit count of
  1938. 245 bits is for 1 level, each additional level would require 83
  1939. bits.
  1940.                                                                  
  1941.                                                                   SECTION 4
  1942.                                                                  WIDTH IN BITS
  1943.  
  1944.                               ┌ 0 01 001 ─── WMO BLOCK NO. ──────────────    7
  1945.                   ┌3 01 001 ──└ 0 01 002 ─── WMO STATION NO. ────────────   10
  1946.                   │
  1947.                   │0 02 011───────────────── RADIOSONDE TYPE ────────────    8    
  1948.                │0 02 012───────────────── RADIOSONDE COMP METHOD──────    4 
  1949.                   │
  1950.         ┌3 01 038─┤           ┌ 0 04 001 ─── YEAR ───────────────────────   12    
  1951.      │         │3 01 011───│ 0 04 002 ─── MONTH ──────────────────────    4
  1952.         │         │           └ 0 04 003 ─── DAY ────────────────────────    6
  1953.         │         │
  1954.         │         │           ┌ 0 04 004 ─── HOUR ───────────────────────    5
  1955.         │         │3 01 012───└ 0 04 005 ─── MINUTE ─────────────────────    6
  1956.         │         │         
  1957.         │         │           ┌ 0 05 002 ─── LATITUDE (COARSE ACCURACY) ─   15
  1958.         │         └3 01 024───│ 0 06 002 ─── LONGITUDE(COARSE ACCURACY) ─   16
  1959.         │                     └ 0 07 001 ─── HEIGHT OF STATION ──────────   15
  1960.         │          
  1961.         │         ┌0 20 010───────────────── CLOUD COVER (TOTAL) ────────    7
  1962.  3 09008┤         │0 08 002───────────────── VERTICAL SIGNIFICANCE ──────    6
  1963.         │         │0 20 011───────────────── CLOUD AMOUNT ───────────────    4
  1964.         │3 02 004─┤0 20 013───────────────── HEIGHT OF BASE OF CLOUD ────   11
  1965.         │         │0 20 012───────────────── CLOUD TYPE Cl ──────────────    6
  1966.         │         │0 20 012───────────────── CLOUD TYPE Cm ──────────────    6
  1967.         │         └0 20 012───────────────── CLOUD TYPE Ch ──────────────    6
  1968.         │
  1969.         │1 01 000 ────────────────────────── DELAYED REP. 1 DESCRIPTOR───    0
  1970.         │0 31 001 ────────────────────────── REPLICATION COUNT ──────────    8
  1971.         │
  1972.         │         ┌0 07 004───────────────── PRESSURE ───────────────────   14
  1973.         │         │0 08 001───────────────── VERTICAL SOUNDING SIG ──────    7
  1974.         │         │0 10 003───────────────── GEOPOTENTIAL ───────────────   17
  1975.         └3 03 014─┤0 12 001───────────────── TEMPERATURE ────────────────   12
  1976.                   │0 12 003───────────────── DEW POINT ──────────────────   12
  1977.                   │0 11 001───────────────── WIND DIRECTION ─────────────    9
  1978.                   └0 11 002───────────────── WIND SPEED ─────────────────   12
  1979.                                                                            ───    
  1980.                                                             TOTAL BITS  245
  1981.  
  1982.  
  1983.      Figure 3-1. Example of TEMP observations sequence using delayed 
  1984.                               replication 
  1985.                                  CHAPTER 4
  1986.  
  1987.                              Data Compression
  1988.  
  1989. 4.1 Introduction.  Even though BUFR makes efficient use of space
  1990. by virtue of binary numbers that take only as many bits as are
  1991. necessary to hold the largest expected value, a further
  1992. compression may be possible.  
  1993.  
  1994. 4.2 Method Used for Data Compression.  The method employed by
  1995. BUFR for data compression is similar to that used in the WMO Code
  1996. FM 92 GRIB (GRidded Binary fields).  Like elements from the full
  1997. set of observations are collected together, their minimum values
  1998. subtracted out, and the difference from the minimum are then
  1999. encoded with a bit length selected to hold the largest difference
  2000. from the minimum value.  This is repeated for all the elements.
  2001.  
  2002. Using the following group of identically defined data subsets:
  2003.  
  2004.           station    station  pressure   temperature  dew point
  2005.           number     height
  2006.  
  2007. subset 1    101       296      10132          122        110
  2008. subset 2    103       291      10122          121        110
  2009. subset 3    107       310      10050          105        099
  2010. subset 4    112       295     missing         110        102
  2011. subset 5    114       350      10055          095        089
  2012. subset 6    116       325      10075          101        091
  2013.  
  2014. Extraction of the minimum value of each element gives:
  2015.  
  2016.             101       291      10050          095        089
  2017.  
  2018. Each value can now be represented as the difference from these
  2019. minimum values:
  2020.  
  2021.           station    station  pressure   temperature  dew point
  2022.           number     height
  2023.  
  2024. subset  1     0         5         82           27         21
  2025. subset  2     2         0         72           26         21
  2026. subset  3     5        19          0           10         10
  2027. subset  4    11         4       missing        15         13
  2028. subset  5    13        59          5            0          0
  2029. subset  6    15        34         25            6          2
  2030.  
  2031. After each difference from the minimum value has been determined
  2032. for each element, determine the number of bits necessary to store
  2033. the largest of the difference values for each element.  For the
  2034. station number the largest difference is 15 which is equivalent
  2035. to 11112, or 4 bits.  However this presents a small problem.  All
  2036. four 
  2037. bits set on, as is the case for the number 15, is properly
  2038. interpreted as "missing", not as a numeric value of 15.  What is
  2039. done is to simply add one bit to the number needed to store the
  2040. largest difference value; thus 15 gets stored in 5 bits, as 01111. 
  2041. It is not necessary to add one bit to the bit lengths for all the
  2042. elements; it is only necessary when one of the numbers to be
  2043. encoded "fills" the available space; that is, if the number is 3 to
  2044. be stored in 2 bits, 7 in 3 bits, 15 in 4 bits, 31 in 5 bits, etc. 
  2045. A convenient way to do this and assure that there is always room
  2046. for "missings" (if needed) is to add 1 to the largest difference
  2047. value and figure the number of bits based on this larger-by-one
  2048. value.
  2049.  
  2050. In the example, the station height would be placed in 6 bits; the
  2051. pressure in 7 (with the "missing" indicated as 1111111), etc., as
  2052. in the following table:
  2053.  
  2054.           station    station                          
  2055.           number     height   pressure   temperature   dew point
  2056. largest
  2057. difference
  2058. value +1     16        60         83           28          22
  2059.  
  2060. number of
  2061. bits          5         6          7            5           5
  2062.  
  2063. Whereas in the non-compressed storage of data in Section 4 there is
  2064. a continuous bit stream for all parameters for an entire
  2065. observation, in the compressed form all elements of the same
  2066. parameter from each observation form a continuous stream (Figure
  2067. 4-1).  In order to determine what the minimum value is that has to
  2068. be added back to each of the following elements, and how many bits
  2069. are being used for the storage of these elements, there are two
  2070. additional items appearing in the compressed form of storage in
  2071. Section 4 that do not appear in the non-compressed form.
  2072.  
  2073. These items are:
  2074.  
  2075.     (1) the minimum value of this parameter and,
  2076.     (2) the number of bits that are being used for the storage of
  2077.         each element. 
  2078.  
  2079. These items of information precede the element values.  The Section
  2080. 4 representation for compressed data for each parameter used in the
  2081. example above is:
  2082.  
  2083.     Station number minimum value (101) occupying 10 bits as 
  2084.     specified by the Table B data width for entry 0 01 002
  2085.     followed by:
  2086.  
  2087.     6 bits containing the count in bits (5) that each of the 
  2088.     station numbers will occupy, followed by:
  2089.     The 6 station number differences from the minimum values (0, 
  2090.  
  2091.                                                                
  2092.                        Section 4 data non-compressed
  2093. ┌────────────────────────────────────────────────────────────────────────────┐
  2094. │                                                                            │
  2095. │parameter 1,parameter 2,..parameter n parameter 1,parameter 2,..parameter n │
  2096. │                                                                            │
  2097. │└───────────────────────────────────┘└─────────────────────────────────────┘│
  2098. │          observation 1                      observation 2                  │
  2099. │                                                                            │ 
  2100. └────────────────────────────────────────────────────────────────────────────┘
  2101.  
  2102.                                                                   
  2103.  
  2104.                          Section 4 data compressed
  2105. ┌────────────────────────────────────────────────────────────────────────────┐
  2106. │                                                                            │
  2107. │minimum                             minimum                                 │
  2108. │  value, bit count, parameter 1,...   value, bit count, parameter 2,...     │
  2109. │                                                                            │
  2110. │└──────────────────────────────────┘└──────────────────────────────────┘    │
  2111. │   observation 1,...observation n      observation 1,...observation n       │
  2112. └────────────────────────────────────────────────────────────────────────────┘
  2113.                                                                  
  2114.      Figure 4-1. Comparison of non-compressed and compressed data in 
  2115.                                 Section 4
  2116.      2, 5, 11, 13 and 15), where each value occupies 5 bits.
  2117.  
  2118. After the last station number difference (15), the next 15 bits
  2119. (Table B data width for entry 0 07 001) will be taken by the
  2120. minimum value for station height (291) followed by the count of
  2121. bits to represent the differences (6) and then each of the elements
  2122. occupying 6 bits apiece (5, 0, 19, 4, 59, 34).
  2123.  
  2124. Continuing the process for all 5 parameters would produce within
  2125. Section 4 the following bit counts:
  2126.  
  2127.                        station   station
  2128.                        number    height    pressure  temperature  dew point
  2129.                 
  2130. Table B descriptor     0 01 002  0 07 001  0 10 004    0 12 004    0 12 006 
  2131.                     
  2132. data width to contain
  2133. minimum value             10        15        14          12          12
  2134.  
  2135. 6 bits containing
  2136. bit count of parameter     6         6         6           6           6 
  2137.  
  2138. Total bits preceding
  2139. each parameter            16        21        20          18          18
  2140.  
  2141.  
  2142. data width to   
  2143. represent difference
  2144. from minimum               5         6         7           5           5
  2145.  
  2146. compressed data       
  2147. representation for    
  2148. 6 subsets                 30        36        42          30          30
  2149.  
  2150. total bit count for 6
  2151. subsets including
  2152. compression bit counts    46    +   57   +    62     +    48       +  48 = 261
  2153.  
  2154. 261 bits are necessary to represent all 6 subsets in compressed
  2155. form in Section 4. 
  2156.  
  2157. Using the same set of values for the 6 subsets in non-compressed
  2158. form there would be bit counts in Section 4 as follows:
  2159.  
  2160.  
  2161.                        station   station 
  2162.                        number    height    pressure  temperature  dew point
  2163.  
  2164. Table B descriptor
  2165. data width                10        15        14          12          12
  2166.  
  2167. total bit count 
  2168. for 6 subsets             60    +   90   +    84     +    72      +   72 = 378
  2169.  
  2170. A total of 378 bits are necessary to represent all 6 subsets in
  2171. non-compressed form.
  2172.  
  2173. There are other conditions that can occur when encoding compressed
  2174. data. If all elements of a set of parameters are missing, the
  2175. minimum value occupying the specified Table B data width in Section
  2176. 4 shall be set to all 1's, the 6 bits specifying how many bits are
  2177. used for each value will be set to 0, and the difference values
  2178. will be omitted.  If, for example all the dew points were missing
  2179. from the 6 subsets then the number of bits to represent dew point
  2180. would be reduced to only include the Table B data width for dew
  2181. point (12 bits) and the 6 bits specifying the bits used for each
  2182. value.
  2183.  
  2184.                        station   station
  2185.                        number    height    pressure  temperature  dew point
  2186.                 
  2187. Table B descriptor     0 01 002  0 07 001  0 10 004    0 12 004    0 12 006 
  2188.  
  2189. data width to contain
  2190. minimum value             10        15        14          12          12
  2191.  
  2192. 6 bits containing
  2193. bit count parameter 
  2194. will occupy                6         6         6           6           6
  2195.  
  2196. Total bits preceding
  2197. each parameter            16        21        20          18          18
  2198.  
  2199.  
  2200. compressed data 
  2201. (difference from  
  2202. minimum)                   5         6         7           5           0
  2203.  
  2204. compressed data       
  2205. representation for    
  2206. 6 subsets                 30        36        42          30           0
  2207.  
  2208. total bit count for 6
  2209. subsets including
  2210. compression identifiers   46    +   57   +    62     +    48       +  18 = 231
  2211.  
  2212.  
  2213. In the non-compressed form, storage of the missing dew point values
  2214. would still occupy 12 bits each, with all bits set to 1.
  2215.  
  2216.                        station   station 
  2217.                        number    height    pressure  temperature  dew point
  2218. Table B descriptor
  2219. data width                10        15        14          12          12
  2220.  
  2221. total bit count 
  2222. for 6 subsets             60    +   90   +    84     +    72      +   72 = 378 
  2223.  
  2224. The other condition that may occur is if all the difference values
  2225. are identical, then, the 6 bits specifying the count of bits for
  2226. each difference value will set to 0, and difference values will be
  2227. omitted.  This condition would produce the same bit count as if all
  2228. elements were missing.
  2229.  
  2230.  
  2231.  
  2232.   Set of parameters missing:
  2233.  
  2234.          minimum value occupying number of bits as indicated in
  2235.          Table B set to all 1's
  2236.  
  2237.          6 bits specifying how many bits are used for each value
  2238.          set to 0 
  2239.  
  2240.          difference values omitted
  2241.  
  2242.  
  2243.   Set of identical parameters:   
  2244.  
  2245.          minimum value occupying number of bits as indicated in
  2246.          Table B set to minimum value (actual value for all 
  2247.          parameters)
  2248.  
  2249.          6 bits specifying how many bits are used for each value
  2250.          set to 0
  2251.  
  2252.          difference values omitted
  2253.  
  2254. Data compression is most effective when the range of values for the
  2255. parameters is small.  In the example of the 6 subsets, each
  2256. parameter has a difference from the minimum value, where the number
  2257. of bits to represent the difference is half, or less than half, the
  2258. number of bits required in non-compressed form for storage in
  2259. Section 4, as indicated by the Table B entry data width.  If the 6
  2260. subsets were put into a message where compression was not applied,
  2261. the length of the message would be 100 octets (Figure 4-2).  By
  2262. applying compression, the length of the message would be reduced to
  2263. 86 octets (Figure 4-3).
  2264.  
  2265. Using the range of values for the same 6 subsets, not realistic,
  2266. but to show the effect of compression for a large data set, a total
  2267. of 4267 subsets could be put into a BUFR message not exceeding
  2268. 15000 octets (Figure 4-5).  In non-compressed form there would only
  2269. be 1898 subsets within the 15000 octet limit (Figure 4-4).
  2270.                 Section    Octet in   Encoded
  2271.                Octet No.   Message    Value     Description
  2272. Section 0 
  2273. (indicator       1-4         1-4       BUFR   encoded international CCITT
  2274. section)                                      Alphabet No. 5
  2275.                  5-7         5-7        100   total length of message (octets)
  2276.                    8           8          2   BUFR edition number Section 1
  2277. (identification  1-3         9-11        18   length of section (octets)
  2278. section)           4           12         0   BUFR master table
  2279.                  5-6        13-14        58   originator (U.S. Navy - FNOC)       
  2280.                 7           15         0   update sequence number
  2281.                    8           16         0   indicator for no Section 2  
  2282.                    9           17         0   Table A - surface land data
  2283.                   10           18         0   BUFR message sub-type
  2284.                   11           19         2   version number of master tables
  2285.                   12           20         0   version number of local tables      
  2286.                13           21        92   year of century
  2287.                   14           22         4   month
  2288.                   15           23        18   day
  2289.                   16           24         0   hour
  2290.                   17           25         0   minute
  2291.                   18           26         0   reserved for local use by ADP           
  2292.                                          centers (also needed to complete 
  2293.                                               even number octets for section   
  2294. Section 3
  2295. (Data            1-3        27-29        18   length of section (octets)
  2296. description        4           30         0   reserved 
  2297. section)         5-6        31-32         6   number of data subsets
  2298.                    7           33   bit 1=1   flag indicating observed data
  2299.                                     bit 2=0   flag indicating no compression      
  2300.              8-17        34-43  0 01 002   WMO station no.          
  2301.                                    0 07 001   height of station
  2302.                                    0 10 004   pressure
  2303.                                    0 12 004   temperature
  2304.                                    0 12 006   dew point
  2305.                    18           44        0   needed to complete section with     
  2306.                                            an even number of octets
  2307. Section 4
  2308. (Data            1-3        45-47        52   length of section (octets)
  2309. section)           4           48         0   reserved
  2310.                 5-52        49-96      data   continuous bit stream of data
  2311.                                               for 6 subsets, 63 bits per 
  2312.                                               subset plus 6 bits to end on 
  2313.                                               even octet
  2314. Section 5
  2315. (End section)    1-4        97-100     7777   encoded CCITT international 
  2316.                                               Alphabet No. 5
  2317.  
  2318.      Figure 4-2. BUFR message of 6 subsets in non-compressed form     
  2319.                Section    Octet in   Encoded
  2320.               Octet No.   Message    Value     Description
  2321. Section 0 
  2322. (indicator       1-4         1-4       BUFR   encoded international CCITT
  2323. section)                                      Alphabet No. 5
  2324.                  5-7         5-7         86   total length of message (octets)
  2325.                    8           8          2   BUFR edition number
  2326. Section 1
  2327. (identification  1-3         9-11        18   length of section (octets)
  2328. section)           4           12         0   BUFR master table
  2329.                  5-6        13-14        58   originator (U.S. Navy - FNOC)       
  2330.                 7           15         0   update sequence number
  2331.                    8           16         0   indicator for no Section 2  
  2332.                    9           17         0   Table A - surface land data
  2333.                   10           18         0   BUFR message sub-type
  2334.                   11           19         2   version number of master tables
  2335.                   12           20         0   version number of local tables
  2336.                   13           21        92   year of century
  2337.                   14           22         4   month
  2338.                   15           23        18   day
  2339.                   16           24         0   hour
  2340.                   17           25         0   minute
  2341.                   18           26         0   reserved for local use by ADP       
  2342.                                            centers (also needed to complete       
  2343.                                         even number octets for section Section 3
  2344. (Data            1-3        27-29        18   length of section (octets)
  2345. description        4           30         0   reserved 
  2346. section)         5-6        31-32         6   number of data subsets
  2347.                    7           33   bit 1=1   flag indicating observed data
  2348.                                     bit 2=1   flag indicating compression         
  2349.              8-17        34-43  0 01 002   WMO station no.          
  2350.                                    0 07 001   height of station
  2351.                                    0 10 004   pressure
  2352.                                    0 12 004   temperature
  2353.                                    0 12 006   dew point
  2354.                   18            44        0   needed to complete section with 
  2355.                                               an even number of octets
  2356. Section 4       
  2357. (Data            1-3        45-47        38   length of section (octets)
  2358. section)           4           48         0   reserved
  2359.                  5-52       49-82      data   261 continuous bits of 
  2360.                                               compressed data plus 11 bits to end 
  2361.                                               on even octet
  2362. Section 5
  2363. (End section)    1-4        83-86      7777   encoded CCITT international 
  2364.                                               Alphabet No. 5
  2365.  
  2366.          Figure 4-3. BUFR message of 6 subsets in compressed form
  2367.                           Section    Octet in   Encoded
  2368.                Octet No.   Message    Value     Description
  2369. Section 0 
  2370. (indicator       1-4         1-4       BUFR   encoded international CCITT
  2371. section)                                      Alphabet No. 5
  2372.                  5-7         5-7      15000   total length of message (octets)
  2373.                    8           8          2   BUFR edition number
  2374. Section 1
  2375. (identification  1-3         9-11        18   length of section (octets)
  2376. section)           4           12         0   BUFR master table
  2377.                  5-6        13-14        58   originator (U.S. Navy - FNOC)       
  2378.                 7           15         0   update sequence number
  2379.                    8           16         0   indicator for no Section 2  
  2380.                    9           17         0   Table A - surface land data
  2381.                   10           18         0   BUFR message sub-type
  2382.                   11           19         2   version number of master tables
  2383.                   12           20         0   version number of local tables
  2384.                   13           21        92   year of century
  2385.                   14           22         4   month
  2386.                   15           23        18   day
  2387.                   16           24         0   hour
  2388.                   17           25         0   minute
  2389.                   18           26         0   reserved for local use by ADP
  2390.                                               centers (also needed to complete
  2391.                                               even number octets for section
  2392. Section 3
  2393. (Data            1-3        27-29        18   length of section (octets)
  2394. description        4           30         0   reserved 
  2395. section)         5-6        31-32      1898   number of data subsets
  2396.                    7           33   bit 1=1   flag indicating observed data
  2397.                                     bit 2=0   flag indicating no compression
  2398.                  8-17       34-43  0 01 002   WMO station no.          
  2399.                                    0 07 001   height of station
  2400.                                    0 10 004   pressure
  2401.                                    0 12 004   temperature
  2402.                                    0 12 006   dew point
  2403.                   18           44         0   needed to complete section with 
  2404.                                               an even number of octets
  2405. Section 4       
  2406. (Data            1-3        45-47     14952   length of section (octets)
  2407. section)           4           48         0   reserved
  2408.                  5-52    49-14996      data   continuous bit stream of data
  2409.                                               for 1898 subsets, 63 bits per    
  2410.                                               subset plus 10 bits to end on    
  2411.                                               even octet
  2412. Section 5
  2413. (End section)    1-4  14997-15000      7777   encoded CCITT international 
  2414.                                               Alphabet No. 5
  2415.  
  2416.      Figure 4-4. BUFR message of 1898 subsets in non-compressed form  
  2417.  
  2418.                Section    Octet in   Encoded
  2419.                Octet No.   Message    Value     Description
  2420. Section 0 
  2421. (indicator       1-4         1-4       BUFR   encoded international CCITT
  2422. section)                                      Alphabet No. 5
  2423.                  5-7         5-7      15000   total length of message (octets)
  2424.                    8           8          2   BUFR edition number
  2425. Section 1
  2426. (identification  1-3         9-11        18   length of section (octets)
  2427. section)           4           12         0   BUFR master table
  2428.                  5-6        13-14        58   originator (U.S. Navy - FNOC)       
  2429.                 7           15         0   update sequence number
  2430.                    8           16         0   indicator for no Section 2  
  2431.                    9           17         0   Table A - surface land data
  2432.                   10           18         0   BUFR message sub-type
  2433.                   11           19         2   version number of master tables
  2434.                   12           20         0   version number of local tables
  2435.                   13           21        92   year of century
  2436.                   14           22         4   month
  2437.                   15           23        18   day
  2438.                   16           24         0   hour
  2439.                   17           25         0   minute
  2440.                   18           26         0   reserved for local use by ADP
  2441.                                               centers (also needed to complete
  2442.                                               even number octets for section
  2443. Section 3
  2444. (Data            1-3        27-29        18   length of section (octets)
  2445. description        4           30         0   reserved 
  2446. section)         5-6        31-32      4267   number of data subsets
  2447.                    7           33   bit 1=1   flag indicating observed data
  2448.                                     bit 2=1   flag indicating compression         
  2449.               8-17       34-43  0 01 002   WMO station no.          
  2450.                                    0 07 001   height of station
  2451.                                    0 10 004   pressure
  2452.                                    0 12 004   temperature
  2453.                                    0 12 006   dew point
  2454.                   18           44         0   needed to complete section with
  2455.                                               an even number of octets
  2456. Section 4       
  2457. (Data            1-3        45-47     14952   length of section (octets)
  2458. section)           4           48         0   reserved
  2459.                  5-52    49-14996      data   119569 continuous bits of 
  2460.                                               compressed data plus 15 bits to end
  2461.                                               on even octet
  2462. Section 5
  2463. (End section)    1-4  14997-15000      7777   encoded CCITT international 
  2464.                                               Alphabet No. 5
  2465.  
  2466.         Figure 4-5. BUFR message of 4267 subsets in compressed form
  2467.                                  CHAPTER 5
  2468.  
  2469.                     Table C Data Description Operators
  2470.  
  2471. 5.1 Introduction.  Table C data description operators (Table 5-1)
  2472. are used when there is a need to redefine Table B attributes
  2473. temporarily, such as the need to change the data width, scale or
  2474. reference value of a Table B entry.
  2475.  
  2476. 5.2 Changing Data Width, Scale and Reference Value.  If data from
  2477. a DRIFTER observation (FM 18-IX Ext., Report of a drifting-buoy
  2478. observation) were being encoded into BUFR, there are no Table B
  2479. entries to correspond to latitude and longitude in thousandths of
  2480. degrees.  The Table B entries for latitude and longitude are high
  2481. accuracy (hundred thousandths of a degree) and coarse accuracy
  2482. (hundredths of a degree).  There are several possible methods to
  2483. handle the encoding of latitude and longitude for DRIFTER in
  2484. thousandths of degrees.  One method would be to choose the high 
  2485. accuracy Table B entries for latitude and longitude in hundred
  2486. thousandths of degrees.  There would be no loss of accuracy, but
  2487. a lot of unused bits for each observation would be encoded in
  2488. Section 4.  The high accuracy latitude requires 25 bits for
  2489. representation, high accuracy longitude 26 bits.  To represent
  2490. latitude and longitude to thousandths of degrees would require 18
  2491. and 19 bits respectively.  If the extra bits from using high
  2492. accuracy were not deemed a concern, this would be the easiest
  2493. method, but if it were desirable to use only the bits required to
  2494. represent latitude and longitude in thousandths of degrees, there
  2495. are two ways for this to be accomplished.  First, and the least
  2496. desirable of any method, would be to create local descriptors for
  2497. Table B with the appropriate scale and reference values for
  2498. thousandths of degrees.  This is the least desirable method
  2499. because if the BUFR message were to be transmitted to another
  2500. center, then the receiving center would have to have available to
  2501. their BUFR decoder program the correct definition of the local
  2502. descriptors. The other method would be to use the Table C data
  2503. description operators 2 01 Y to change the data width of the
  2504. Table B descriptor for latitude and longitude, 2 02 Y to change
  2505. the scale and 2 03 Y to change the reference values. 
  2506.  
  2507. There is now a choice to be made between temporarily changing
  2508. latitude and longitude from hundredths of degrees to thousandths,
  2509. or, from changing them from hundred thousandths to thousandths. 
  2510. It doesn't matter which is done, as the only difference between
  2511. the choices will be the Y operand entries of the data description
  2512. operators.  
  2513.  
  2514. If it were decided to change the data width of latitude and
  2515. longitude from hundredths to thousandths of degrees, what first
  2516. must be done is to determine how many bits are necessary to
  2517. represent individually latitude and longitude in thousandths of a
  2518. degree.  The maximum value for latitude to be represented in the
  2519.               5-1. BUFR Table C - Data Description Operators 
  2520.  
  2521. Table 
  2522. Reference  Operand  Operator Name      Operation Definition
  2523.  
  2524.   F   X
  2525.  
  2526.   2  01       Y     Change data width  Add (Y-128) bits to the 
  2527.                                        data width for each data 
  2528.                                        element in Table B, other
  2529.                                        than CCITT IA5 (character)
  2530.                                        data, code or flag tables
  2531.  
  2532.   2  02       Y     Change scale       Multiply scale given for
  2533.                                        each non-code data
  2534.                     elements
  2535.                                        in Table B by 10^(Y-128)
  2536.  
  2537.   2  03       Y     Change reference   Subsequent element 
  2538.                     values             descriptors define new 
  2539.                                        reference values for 
  2540.                                        corresponding Table B 
  2541.                                        entries.  Each new
  2542.                     reference
  2543.                                        value is represented by Y
  2544.                                        bits in the Data Section. 
  2545.                                        Definition of new refer-
  2546.                                        ence values in concluded
  2547.                                        by encoding this operator
  2548.                                        with Y=255.  Negative ref-
  2549.                                        erence values shall be 
  2550.                                        represented by a positive
  2551.                                        integer with the left-most
  2552.                                        bit (bit 1) set to 1
  2553.  
  2554.   2  04       Y     Add associated     Precede each data element
  2555.                     field               with Y bits of
  2556.                     information 
  2557.                                        This operation associates 
  2558.                                        a data field (e.g. quality
  2559.                                        control information) of Y
  2560.                                        bits with each data
  2561.                     element.
  2562.  
  2563.   2  05       Y     Signify character  Y characters (CCITT inter-
  2564.                                        national Alphabet No. 5) 
  2565.                                        are inserted as a data 
  2566.                                        field of Y x 8 bits in 
  2567.                                        length
  2568.  
  2569.   2  06       Y     Signify data       Y bits of data are 
  2570.                     width for the      described by the 
  2571.                     immediately        immediately following
  2572.                     following local    descriptor
  2573.                     descriptor
  2574.  
  2575. data in Section 4 would be based on taking into consideration the
  2576. also to be changed reference value of -9000.  The new reference
  2577. value will be -90000 to accommodate thousandths of degrees.  The
  2578. maximum value of a reported latitude to be encoded into BUFR bits
  2579. is 180000.  This value is arrived at by a reported latitude of
  2580. 90.000 North which must then be scaled to 10^3 (also to be changed
  2581. from 10^2) to retain the desired precision, then subtracting the
  2582. reference value of -90000, producing 180000. The number of bits to
  2583. accommodate 18000010 is 18.  To change the data width of the Table
  2584. B entry for latitude (coarse accuracy) from 15 bits to 18 bits
  2585. would require the Table C entry 2 01 131.  The Y operand 131 is
  2586. determined by the Operation Definition of adding Y-128 bits to the
  2587. data width given for the element 0 05 002.  The number 128 is the
  2588. midpoint between 1 and 255 which is the range of values for the 8
  2589. bits of Y.  Numbers between 1 and 127 will produce a negative value
  2590. for changing data width, 129 to 255 a positive value.  
  2591.  
  2592. The next step would be to change the scale from 10^2 to 10^3 in
  2593. order to properly decode the reported latitude which will be
  2594. encoded in Section 4 with 18 bits.  The WMO BUFR definition for
  2595. change scale, "Multiply scale given for each non-code data element
  2596. in Table B by 10^(Y-128)", is referring to the result of 10^scale.
  2597. For Table B entry 0 05 002, the scale is 2.  In this case it is the
  2598. resultant value 100 which is to be multiplied by   10^(Y-128), not
  2599. the scale 2.  Thus, the data description operator to change the
  2600. scale for Table B entry 0 05 002 would be 2 02 129. 
  2601.  
  2602. To complete the necessary changes for Table B, the reference value
  2603. also needs to be modified from -9000 to -90000.  Here again it must
  2604. be determined how many bits are necessary to accommodate the new
  2605. value, as the new reference value itself is encoded into Section 4. 
  2606. The number of bits to accommodate 90000 (positive value) is 17.  It
  2607. is, however, necessary to indicate this is to be a negative value
  2608. which will require an additional bit.  To indicate a new reference
  2609. value as negative, the left most bit of the reference value encoded
  2610. into Section 4 is set to 1.  The sequence of operators needed to
  2611. refedine or change a reference value is:
  2612.  
  2613.      1) the 2 03 018 "change reference values operator", which
  2614.      announces a change and states how many bits are set aside for
  2615.      the new reference value in the data section (18 in this
  2616.      example)
  2617.  
  2618.      2) one or more regular (F=0) data descriptors to indicate
  2619.      which variable(s) are to have new reference values.  There
  2620.      are, of course, as many 18-bit values in the data as there are
  2621.      data descriptors following the 2 03 018 descriptor.
  2622.  
  2623. In this particular case it will not be necessary to have separate
  2624. Data Description operators to modify longitude data width and
  2625. change of scale.  The increase in number of bits for data width to
  2626. accommodate longitude to thousandths of degrees is also 3.  The
  2627. change of scale also remains the same.  There will, however, be a
  2628. required change of reference value from -18000 to -180000.  By
  2629. following the same steps as when changing the latitude Table
  2630. reference value, the Data Description operator for changing the
  2631. longitude reference value would be 2 03 019 followed by the data
  2632. descriptor 0 06 002, followed by the descriptor 2 03 255 to
  2633. indicate the end of the list of descriptors for which reference
  2634. values are being changed.
  2635.  
  2636. Once Data Description operators 2 01 Y, 2 02 Y and 2 03 Y have been
  2637. used in Section 3, they remain in effect for the rest of whatever
  2638. follows in the Section 3 data descriptions.  To cancel operator 2
  2639. 01, and 2 02, the additional entries must 2 01 000 and 2 02 000
  2640. must be included in Section 3.  To cancel the reference value
  2641. change indicated by the operator 2 03 018, there must be included
  2642. in Section 3 an operator 2 03 000.
  2643.  
  2644. The data description operators encoded into Section 3 for DRIFTER
  2645. observations would then be:
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.                   0 01 005    buoy/platform identifier
  2684.  
  2685.                   0 02 001    type of station
  2686.  
  2687.                   3 01 011    Table D descriptor which expands to
  2688.                               descriptors for year, month and day
  2689.  
  2690.                   3 01 012    Table D descriptor which expands to 
  2691.                               descriptors for hour and minute
  2692.                          
  2693.     ┌───────────  2 01 131    increase data width by 3
  2694.     │
  2695.     │    ┌──────  2 02 129    multiply scale by 10^1
  2696.     │    │
  2697.     │    │   ┌──  2 03 018    change reference value - new value 
  2698.     │    │   │                contained in 18 bits in Section 4 
  2699.     │    │   │
  2700.     │    │   │    0 05 002    new reference value applies to  
  2701.     │    │   │                latitude - coarse accuracy          
  2702.     │    │   │
  2703.     │    │   └──  2 03 255    terminate reference value definition
  2704.     │    │                    203018
  2705.     │    │
  2706.     │    │   ┌──  2 03 019    change reference value - new value  
  2707.     │    │   │                contained in 19 bits in Section 4   
  2708.     │    │   │
  2709.     │    │   │    0 06 002    new reference value applies to 
  2710.     │    │   │                longitude - coarse accuracy 
  2711.     │    │   │
  2712.     │    │   └──  2 03 255    terminate reference value definition
  2713.     │    │
  2714.     │    │                    OTHER ADDITIONAL DATA DESCRIPTORS   
  2715.     │    │                    TO COMPLETE DRIFTER DESCRIPTION
  2716.     │    │
  2717.     │    └──────  2 02 000    cancel change scale
  2718.     │
  2719.     └───────────  2 01 000    cancel change data width
  2720.  
  2721.                   2 03 000    Cause all redefined reference    
  2722.                               values to revert back to standard
  2723.                               Table B values
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732. The order for cancellation of nested Data Description operators
  2733. follows the above pattern where the last defined is the first
  2734. canceled.
  2735.  
  2736. If instead of changing latitude and longitude from hundredths to
  2737. thousandths, it were to be changed from hundred thousandths to
  2738. thousandths the following descriptions would be used:
  2739.  
  2740.                   0 01 005    buoy/platform identifier
  2741.  
  2742.                   0 02 001    type of station
  2743.  
  2744.                   3 01 011    Table D descriptor which expands to
  2745.                               descriptors for year, month and day
  2746.  
  2747.                   3 01 012    Table D descriptor which expands to 
  2748.                               descriptors for hour and minute
  2749.                          
  2750.     ┌───────────  2 01 121    decrease data width by 7
  2751.     │
  2752.     │    ┌──────  2 02 127    multiply scale by -1
  2753.     │    │
  2754.     │    │   ┌──  2 03 018    change reference value - new value  
  2755.     │    │   │                contained in 18 bits in Section 4 
  2756.     │    │   │
  2757.     │    │   │    0 05 001    new reference value applies to
  2758.     │    │   │                latitude - high accuracy
  2759.     │    │   │  
  2760.     │    │   └──  2 03 255    terminate reference value definition
  2761.     │    │                    203018
  2762.     │    │
  2763.     │    │   ┌──  2 03 019    change reference value - new value 
  2764.     │    │   │                contained in 19 bits in Section 4   
  2765.     │    │   │
  2766.     │    │   │    0 06 001    new reference value applies to
  2767.     │    │   │                longitude - high accuracy
  2768.     │    │   │
  2769.     │    │   └──  2 03 255    terminate reference value definition
  2770.     │    │                          
  2771.     │    │                    OTHER ADDITIONAL DATA DESCRIPTORS
  2772.     │    │                    TO COMPLETE DRIFTER DESCRIPTION
  2773.     │    │
  2774.     │    └──────  2 02 000    cancel change scale
  2775.     │
  2776.     └───────────  2 01 000    cancel change data width
  2777.  
  2778.                   2 03 000    Cause all redefined reference
  2779.                               values to revert back to standard
  2780.                               Table B values Which would be the better of the methods?  Again, use of local
  2781. descriptors to define latitude and longitude is not a good idea as
  2782. their use may cause a BUFR message to be undecodable in some other
  2783. center.  Of the two other methods, using high accuracy latitude and
  2784. longitude, or using Data Description operators to change latitude
  2785. and longitude definitions to thousandths of degrees will each
  2786. produce the same results.  In terms of number of bits saved by
  2787. changing to thousandths of degrees over high accuracy, a DRIFTER
  2788. observation containing data equivalent to the DRIFTER code (FM
  2789. 18-IX Ext. Sections 0 through Section 2) would require 214 bits per
  2790. observation using high accuracy latitude and longitude.  If
  2791. latitude and longitude were changed by Data Description operators
  2792. to thousandths of degrees then the observation would require 200
  2793. bits per observation, or a savings of 14 bits per observation,
  2794. hardly worth the effort! 
  2795.  
  2796. The preceding example does not imply that changing data width,
  2797. scale and reference values should not be done, but it does point
  2798. out that to do so to lower the number of bits within the data
  2799. section for a given parameter is probably not that beneficial.  In
  2800. those instances where the Table B entries do not provide enough
  2801. significance for new technologies, then the flexibility is provided
  2802. within BUFR to handle those situations.  If, for example,
  2803. satellites were to measure latitude and longitude to millionths of
  2804. degrees, then, to maintain significance of those measurements would
  2805. require changing data width, scale and reference values, at least
  2806. until (or if) there is a new Table B entry.
  2807.  
  2808. This example also shows that when changing data width, scale and
  2809. reference values, a single Table D descriptor cannot be used in
  2810. Section 3.  The reason is that changing data width and scale apply
  2811. to all descriptors in Table B until the change data width and/or
  2812. change scale is canceled.  Since the descriptor to be affected may
  2813. be deep within the Table D expansion process, there is no way to
  2814. include the Data Descriptor operators in that expansion.  A change
  2815. in reference value, however, can be accomplished while still using
  2816. a single Table D entry.  This is possible because after the entry
  2817. for change reference value, 2 03 YYY, there must also be included
  2818. the Table B descriptor or multiple descriptors that are to have new
  2819. reference values.
  2820.  
  2821. 5.2.1 Changing Reference Value Only.  The Table B entries for
  2822. geopotential, 0 07 003 and 0 10 003 have a reference value of -400,
  2823. too restrictive for very low pressure systems.  The Table C Data
  2824. Description operator 2 03 YYY can be placed as the first descriptor
  2825. in Section 3, followed by the Table B descriptor(s) to which it
  2826. applies.  Placing 2 03 010, followed by 0 10 003 before the Table
  2827. D descriptor means that each time data is encountered in Section 4
  2828. for 0 10 003, the new reference value indicated by the count of 10
  2829. bits specified by YYY applies.  Within 10 bits the limit of the new
  2830. reference value as a negative number is -511.  The descriptor to
  2831. conclude the list of descriptors for which new reference values are
  2832. supplied follows immediately, followed in turn by the Table D
  2833. descriptor (Figure 5-1).  In  Figure 5-1, the order of the Section
  2834. 3 descriptors is:
  2835.  
  2836.                   2 03 010  0 10 003  2 03 255  3 09 008
  2837.  
  2838. The Section 4 data will be in the order as indicated by Figure
  2839. 5-1.                                                                   SECTION 4
  2840.                                                               WIDTH IN BITS
  2841.  
  2842. 2 03 010 ───────────────────────────────── CHANGE REFERENCE VALUE    
  2843.                                            (ACTUAL REFERENCE VALUE
  2844.                                            IN SECTION 4) ─────────────    0 
  2845.  
  2846. 0 10 003 ──────────────────────────────── REFERENCE VALUE TO CHANGE:              
  2847.                                        GEOPOTENTIAL ───────────────   10
  2848.                                                                            
  2849. 2 03 255 ──────────────────────────────── TERMINATE CHANGE REFERENCE 
  2850.                                           VALUE ──────────────────────    0
  2851.                                                                            
  2852.                             ┌ 0 01 001 ── WMO BLOCK NO. ──────────────    7
  2853.                  ┌3 01 001 ─└ 0 01 002 ── WMO STATION NO. ────────────   10
  2854.                  │
  2855.                  │0 02 011─────────────── RADIOSONDE TYPE ────────────    8       
  2856.               │0 02 012─────────────── RADIOSONDE COMP METHOD──────    4    
  2857.                  │
  2858.         ┌3 01 0 8┤          ┌ 0 04 001 ── YEAR ───────────────────────   12       
  2859.      │        │3 01 011 ─│ 0 04 002 ── MONTH ──────────────────────    4
  2860.         │        │          └ 0 04 003 ── DAY ────────────────────────    6
  2861.         │        │ 
  2862.         │        │          ┌ 0 04 004 ── HOUR ───────────────────────    5
  2863.         │        │3 01 012 ─└ 0 04 005 ── MINUTE ─────────────────────    6
  2864.         │        │          
  2865.         │        │          ┌ 0 05 002 ── LATITUDE (coarse accuracy) ─   15
  2866.         │        └3 01 024 ─│ 0 06 002 ── LONGITUDE(coarse accuracy) ─   16
  2867.         │                   └ 0 07 001 ── HEIGHT OF STATION ──────────   15
  2868.         │          
  2869.         │        ┌0 20 010─────────────── CLOUD COVER (TOTAL) ────────    7
  2870. 3 09 008┤        │0 08 002─────────────── VERTICAL SIGNIFICANCE ──────    6
  2871.         │        │0 20 011─────────────── CLOUD AMOUNT ───────────────    4
  2872.         │3 02 004┤0 20 013─────────────── HEIGHT OF BASE OF CLOUD ────   11
  2873.         │        │0 20 012─────────────── CLOUD TYPE Cl ──────────────    6
  2874.         │        │0 20 012─────────────── CLOUD TYPE Cm ──────────────    6
  2875.         │        └0 20 012─────────────── CLOUD TYPE Ch ──────────────    6
  2876.         │                                
  2877.         │1 01 000 ─────────────────────── DELAYED REP. 1 FACTOR ──────    0
  2878.         │0 31 001 ─────────────────────── REPLICATION FACTOR ─────────    8
  2879.         │                                
  2880.         │        ┌0 07 004─────────────── PRESSURE  ──────────────────   14
  2881.         │        │0 08 001─────────────── VERTICAL SOUNDING SIG  ─────    7       
  2882.      │        │0 10 003─────────────── GEOPOTENTIAL  ──────────────   17
  2883.         └3 03 014┤0 12 001─────────────── TEMPERATURE  ───────────────   12
  2884.                  │0 12 003─────────────── DEW POINT  ─────────────────   12
  2885.                  │0 11 001─────────────── WIND DIRECTION  ────────────    9
  2886.                  └0 11 002─────────────── WIND SPEED  ────────────────   12
  2887.                                                                            
  2888. 2 03 000  ─────────────────────────────── CAUSE REDEFINED REFERENCE
  2889.                                           VALUE TO REVERT BACK TO 
  2890.                                           STANDARD TABLE B VALUE  ────    0
  2891.                                                                         ───       
  2892.                                                          TOTAL BITS  255
  2893.  
  2894.             Figure 5-1. Change reference value of geopotential
  2895. 5.3 Add Associated Field.  The Data Description operator 2 04 Y
  2896. permits the inclusion of quality control information of Y bits
  2897. attached to each following data element.  The additional YYY bits
  2898. of the associated field appear in the data section as prefixes to
  2899. the actual data elements.  The Add Associated Field operator,
  2900. whenever used, must be immediately followed by the Class 31 Data
  2901. Description Operator Qualifier 0 31 021 to indicate the meaning of
  2902. the associated fields.  
  2903.  
  2904.                                  0 31 021
  2905.                        Associated field significance
  2906.  
  2907.   Code
  2908.  figure
  2909.  
  2910.    0     Reserved
  2911.    1     1 bit indicator of quality     0 = good
  2912.                                         1 = suspect or bad
  2913.  
  2914.    2     2 bit indicator of quality     0 = good
  2915.                                         1 = slightly suspect
  2916.                                         2 = highly suspect
  2917.                                         3 = bad
  2918.  
  2919.   3-6    Reserved
  2920.    7     Percentage confidence
  2921.    
  2922.   8-20   Reserved
  2923.    21    1 bit indicator of correction  0 = original value
  2924.                                         1 = substituted/corrected
  2925.                                             value
  2926.  22-62   Reserved for local use
  2927.    63    Missing value
  2928.  
  2929. If quality control information were to be added to a single
  2930. parameter such as pressure, Table B descriptor 0 07 004, the
  2931. following sequence would appear in Section 3:
  2932.  
  2933.                   2 04 007  0 31 021  0 07 004  2 04 000
  2934.  
  2935. The meaning of this sequence is:
  2936.  
  2937.     2 04 007 - indicator that 7 bits of data precede all
  2938.                following Table B entries
  2939.  
  2940.     0 31 021 - code table entry for the meaning of the 7 bits
  2941.                preceding the Table B entry
  2942.  
  2943.     0 07 004 - Table B entry for pressure
  2944.  
  2945.     2 04 000 - cancellation of the Add Associated Field operator
  2946. The Section 4 data width for this sequence is 27 bits.  The
  2947. operators 2 04 007 and 2 04 000 do not occupy any bits within
  2948. Section 4.  The 27 bits are taken by 0 31 021 (6 bits) and 0 07 004
  2949. (21 bits, 7 bits of associated field plus 14 bits of pressure
  2950. value)
  2951.  
  2952. When multiple Table B entries are preceded by 2 04 YYY as in:
  2953.  
  2954.        2 04 007  0 31 021  0 07 004  0 31 021  0 10 003  2 04 000  
  2955.  
  2956. the Add Associated Field operator 2 04 007 and the Data
  2957. Description Operator Qualifier 0 31 021 both apply to the Table B
  2958. descriptors 0 07 004 and 0 10 003.  The Section 4 data width for
  2959. the sequence is then:
  2960.  
  2961.           2 04 007    0 bits
  2962.           0 31 021    6
  2963.           0 07 004   21 (7 associated bits plus bits 14 data)
  2964.           0 31 021    6 (change meaning of associated field)
  2965.           0 10 003   24 (7 associated bits plus 17 bits data)
  2966.           2 04 000    0 
  2967.  
  2968. Note that the associated fields are not prefixed onto the data
  2969. described by 0 31 YYY descriptor.  This is a general rule: none
  2970. of the Table C operators are applied to any the Table B, Class 31
  2971. descriptors.
  2972.                               
  2973. If quality control information were to be added to the following
  2974. sequence of parameters as described by the Table D descriptor
  2975. 3 03 014:        
  2976.                                                              SECTION 4   
  2977.                                                             WIDTH IN BITS
  2978.  
  2979.            ┌0 07 004───────────────── PRESSURE ───────────────────   14
  2980.            │0 08 001───────────────── VERTICAL SOUNDING SIG ──────    7
  2981.            │0 10 003───────────────── GEOPOTENTIAL ───────────────   17
  2982.   3 03 014─┤0 12 001───────────────── TEMPERATURE ────────────────   12
  2983.            │0 12 003───────────────── DEW POINT ──────────────────   12
  2984.            │0 11 001───────────────── WIND DIRECTION ─────────────    9
  2985.            └0 11 002───────────────── WIND SPEED ─────────────────   12
  2986.                                                                     ───
  2987.                                                                      83
  2988.  
  2989.  
  2990. By placing in Section 3 the operators 2 04 YYY and 0 31 021
  2991. immediately preceding 3 03 014, and the cancellation operator
  2992. 2 04 000 following 3 03 014, the following sequence would be
  2993. produced:
  2994.                                                                   SECTION 4
  2995.                                                               WIDTH IN BITS
  2996.         ┌── 2 04 007───────────────── ADD ASSOCIATED FIELD            0
  2997.         │ 
  2998.         │   0 31 021───────────────── ASSOCIATED FIELD SIG            6           
  2999.      │                             ASSOCIATED FIELD ───────────    7
  3000.         │   0 07 004───────────────── PRESSURE ───────────────────   14
  3001.         │                             ASSOCIATED FIELD ───────────    7
  3002.         │   0 08 001───────────────── VERTICAL SOUNDING SIG ──────    7
  3003.         │                             ASSOCIATED FIELD ─── ───────    7
  3004.         │   0 10 003───────────────── GEOPOTENTIAL ───────────────   17
  3005.         │                             ASSOCIATED FIELD ─── ───────    7 
  3006.         │   0 12 001───────────────── TEMPERATURE ────────────────   12
  3007.         │                             ASSOCIATED FIELD ───────────    7
  3008.         │   0 12 003───────────────── DEW POINT ──────────────────   12
  3009.         │                             ASSOCIATED FIELD ───────────    7
  3010.         │   0 11 001───────────────── WIND DIRECTION ─────────────    9
  3011.         │                             ASSOCIATED FIELD ───────────    7
  3012.         │   0 11 002───────────────── WIND SPEED ─────────────────   12
  3013.         │
  3014.         └── 2 04 000───────────────── CANCEL ADD ASSOCIATED FIELD─    0
  3015.                                                                     ───
  3016.                                                                     138
  3017.  
  3018. Adding associated fields to a data sequence that is described by
  3019. a Table D descriptor means the associated fields are placed
  3020. before all data items in the sequence.  If quality control
  3021. information were to be applied only to the pressure and
  3022. geopotential parameters, the Table D descriptor could not be used
  3023. but instead each individual parameter would have to be listed in
  3024. Section 3.  
  3025.  
  3026.         ┌── 2 04 007───────────────── ADD ASSOCIATED FIELD ───────    0
  3027.         │   0 31 021───────────────── ASSOCIATED FIELD SIG ───────    6
  3028.         │                             ASSOCIATED FIELD ───────────    7
  3029.         │   0 07 004───────────────── PRESSURE ───────────────────   14
  3030.         └── 2 04 000───────────────── CANCEL ADD ASSOCIATED FIELD─    0
  3031.          
  3032.             0 08 001───────────────── VERTICAL SOUNDING SIG ──────    7
  3033.          
  3034.         ┌── 2 04 007───────────────── ADD ASSOCIATED FIELD────────    0
  3035.         │   0 31 021───────────────── ASSOCIATED FIELD SIG ───────    6
  3036.         │           ───────────────── ASSOCIATED FIELD                7
  3037.         │   0 10 003───────────────── GEOPOTENTIAL ───────────────   17
  3038.         │
  3039.         └── 2 04 000───────────────── CANCEL ADD ASSOCIATED FIELD─    0
  3040.  
  3041.             0 12 001───────────────── TEMPERATURE ────────────────   12
  3042.             0 12 003───────────────── DEW POINT ──────────────────   12
  3043.             0 11 001───────────────── WIND DIRECTION ─────────────    9
  3044.             0 11 002───────────────── WIND SPEED ─────────────────   12
  3045.                                                                     ───
  3046.                                                                     109
  3047.  
  3048. If quality control information were to be add to TEMP
  3049. observations as described in Figure 3-1 the following adjustments
  3050. would have to be made.  The single Table D descriptor 3 09 008
  3051. could no longer be used as the expansion includes the additional
  3052. Table D descriptor  3 03 014 which further expands to those
  3053. parameters where quality control information would need to be
  3054. inserted.  The actual order of the Section 3 descriptors would
  3055. now be (Figure 5-2):
  3056.  
  3057.  3 01 038   3 02 004   1 13 000   0 31 001   2 04 007   0 31 021
  3058.  0 07 004   2 04 000   0 08 001   2 04 007   0 31 021   0 10 003
  3059.  2 04 000   0 12 001   0 12 003   0 11 001   0 11 002
  3060.                                                                   SECTION 4
  3061.                                                               WIDTH IN BITS
  3062.  
  3063.                      ┌ 0 01 001 ─── WMO BLOCK NO. ──────────────    7
  3064.          ┌3 01 001 ──└ 0 01 002 ─── WMO STATION NO. ────────────   10
  3065.          │
  3066.          │0 02 011───────────────── RADIOSONDE TYPE ────────────    8             
  3067.       │0 02 012───────────────── RADIOSONDE COMP METHOD──────    4          
  3068.          │
  3069. 3 01 038─┤           ┌ 0 04 001 ─── YEAR ───────────────────────   12             
  3070.       │3 01 011───│ 0 04 002 ─── MONTH ──────────────────────    4
  3071.          │           └ 0 04 003 ─── DAY ────────────────────────    6
  3072.          │
  3073.          │           ┌ 0 04 004 ─── HOUR ───────────────────────    5
  3074.          │3 01 012───└ 0 04 005 ─── MINUTE ─────────────────────    6
  3075.          │         
  3076.          │           ┌ 0 05 002 ─── LATITUDE (COARSE ACCURACY) ─   15
  3077.          └3 01 024───│ 0 06 002 ─── LONGITUDE(COARSE ACCURACY) ─   16
  3078.                      └ 0 07 001 ─── HEIGHT OF STATION ──────────   15
  3079.                    
  3080.          ┌0 20 010───────────────── CLOUD COVER (TOTAL) ────────    7
  3081.          │0 08 002───────────────── VERTICAL SIGNIFICANCE ──────    6
  3082.          │0 20 011───────────────── CLOUD AMOUNT ───────────────    4
  3083. 3 02 004─┤0 20 013───────────────── HEIGHT OF BASE OF CLOUD ────   11
  3084.          │0 20 012───────────────── CLOUD TYPE Cl ──────────────    6
  3085.          │0 20 012───────────────── CLOUD TYPE Cm ──────────────    6
  3086.          └0 20 012───────────────── CLOUD TYPE Ch ──────────────    6
  3087.                                    
  3088. 1 13 000 ────────────────────────── DELAYED REP. 13 DESCRIPTORS─    0
  3089. 0 31 001 ────────────────────────── REPLICATION FACTOR ─────────    8
  3090.  
  3091. 2 04 007 ────────────────────────── ADD ASSOCIATED FIELD ───────    0
  3092. 0 31 021 ────────────────────────── ASSOCIATED FIELD SIG. ──────    6
  3093.                                     ASSOCIATED FIELD ───────────    7
  3094. 0 07 004─────────────────────────── PRESSURE ───────────────────   14
  3095. 2 04 000─────────────────────────── CANCEL ADD ASSOCIATED FIELD─    0
  3096.  
  3097. 0 08 001─────────────────────────── VERTICAL SOUNDING SIG ──────    7
  3098.  
  3099. 2 04 007─────────────────────────── ADD ASSOCIATED FIELD ───────    0        
  3100. 0 31 021─────────────────────────── ASSOCIATED FIELD SIG. ──────    6
  3101.                                     ASSOCIATED FIELD ───────────    7
  3102. 0 10 003─────────────────────────── GEOPOTENTIAL ───────────────   17
  3103. 2 04 000─────────────────────────── CANCEL ADD ASSOCIATED FIELD─    0
  3104.  
  3105. 0 12 001─────────────────────────── TEMPERATURE ────────────────   12
  3106. 0 12 003─────────────────────────── DEW POINT ──────────────────   12
  3107. 0 11 001─────────────────────────── WIND DIRECTION ─────────────    9
  3108. 0 11 002─────────────────────────── WIND SPEED ─────────────────   12
  3109.                                                                   ───
  3110.                                                       TOTAL BITS  277
  3111.  
  3112.      Figure 5-2. Example of TEMP observations sequence using delayed 
  3113.                replication and quality control information  5.4 Encoding Character Data.  There may be occasions when it is
  3114. necessary to encode character data into BUFR.  An observation
  3115. encoded into BUFR that originated from the character code FM 13-IX
  3116. Ext. SHIP, for example, has within that code form the optional
  3117. inclusion of plain language.  If this character information were
  3118. carried over for encoding into BUFR, the Data Description operator
  3119. 2 05 Y would be used in Section 3 to indicate the inclusion of
  3120. character data in Section 4 of the BUFR message.  The Y operand of
  3121. the Data Descriptor indicates the number of characters, encoded
  3122. CCITT International Alphabet No. 5, inserted as a data field in
  3123. Section 4.
  3124.  
  3125. The following parameters from the FM 13-IX Ext. SHIP code form:
  3126.  
  3127.  
  3128.                      ┌    6IsEsEsRs    ┐
  3129.                      │                 │
  3130.                   (  │  or ICING +     │  )
  3131.                      │                 │
  3132.                      └  plain language ┘
  3133.  
  3134.                   
  3135. described by BUFR descriptors would be:
  3136.  
  3137.               0 20 033   cause of ice accretion
  3138.               0 20 031   ice deposit (thickness)
  3139.               0 20 032   rate of ice accretion
  3140.                               
  3141. It would have to be determined in advance how many characters would
  3142. be allowed for the plain language.  If only the word ICING were to
  3143. be placed in Section 4, the Data Descriptor 2 05 005 would be used. 
  3144. If it were determined that ICING plus 25 additional characters,
  3145. including spaces, were to be described then the descriptor would be
  3146. 2 05 030. The data descriptors and data width in Section 4 would
  3147. then be:
  3148.                                                    data width
  3149.                                                      in bits
  3150.  
  3151.               0 20 033   cause of ice accretion          4        
  3152.               0 20 031   ice deposit (thickness)         7
  3153.               0 20 032   rate of ice accretion           3
  3154.               2 05 030   character information         240
  3155.  
  3156.  
  3157. Since an observation in FM 13-IX EXT. SHIP code would have either
  3158. the parameters for ice reported, or ICING + plain language, but not
  3159. both, then if there were no plain language the character
  3160. information would be set to spaces.  If the ICING + plain language
  3161. were reported then the data for descriptors 0 20 033, 0 20 031 and
  3162. 0 20 032 would be set to missing, all bits set.  Since Section 3
  3163. indicates a count of how many subsets (observations) are included
  3164. in Section 4, the above descriptors apply to all subsets, even if
  3165. an individual observation does not contain any icing information. 
  3166. In that case the entire set of icing data for an observation would
  3167. be set to missing and spaces.
  3168.  
  3169. 5.5 Signifying Length of Local Descriptors.  Local Descriptors were
  3170. provided in BUFR to enable a data processing center the capability
  3171. of describing information of any type within BUFR for the center's
  3172. internal use (Figure 2-4).  There does exist, however, the
  3173. possibility that once data is described in BUFR it may be necessary
  3174. to transmit a BUFR message to another center, where the BUFR
  3175. message would contain local information.  Since a receiver of the
  3176. BUFR message may or not know the meaning of the local descriptor,
  3177. it could be impossible to be able to decode the message, as the
  3178. receiver would not know the data width in Section 4 of the local
  3179. information (Figure 2-5).  While it could be argued that BUFR
  3180. messages containing local information should never be transmitted
  3181. to another center, it may require a separate set of software to
  3182. remove local information before the message is ready for
  3183. transmission.  To overcome this situation the Data Description
  3184. operator 2 06 Y was developed to allow local information to be
  3185. contained within a transmitted message and to give information to
  3186. the receiver that indicates the length in bits of the local data. 
  3187. The meaning of the Data Description operator 2 06 Y is that the
  3188. following local descriptor is describing Y bits of data in Section
  3189. 4 (Figure 5-3).  Knowing the width in bits of data in Section 4
  3190. then allows the receiver of the message to bypass that number of
  3191. bits and allow proper decoding of Section 4.
  3192.  
  3193. The operator 2 06 Y can only be used when it precedes a local
  3194. descriptor with F = 0.  While it is within the rules of BUFR to
  3195. create local descriptors with F = 3 (sequence descriptor),  the
  3196. Data Description operator 2 06 Y cannot be used to bypass whatever
  3197. number of bits are being described by a sequence descriptor.  Since
  3198. a sequence descriptor expands to other descriptors and in the
  3199. expansion process other local descriptors or delayed replication
  3200. may be encountered, there is no way of knowing in advance how many
  3201. total bits are covered by a sequence descriptor. 
  3202.  
  3203.                                                                  SECTION 4
  3204.                                                              WIDTH IN BITS
  3205.  
  3206. 2 06 003 ──────────────────────────────── 3 BITS ARE DESCRIBED BY THE 
  3207.                                           FOLLOWING LOCAL DESCRIPTOR ─    0
  3208.  
  3209. 0 54 192 ──────────────────────────────── LOCAL DESCRIPTOR  ──────────    3
  3210.  
  3211.                            ┌ 0 01 001 ──  WMO BLOCK NO.───────────────    7
  3212.                  ┌3 01 001─┴ 0 01 002 ──  WMO STATION NO.─────────────   10
  3213.                  │
  3214.                  │0 02 001──────────────  TYPE OF STATION ────────────    2       
  3215.               │
  3216.         ┌3 01 023┤         ┌ 0 04 001 ─── YEAR ───────────────────────   12       
  3217.      │        │3 01 011─┤ 0 04 002 ─── MONTH ──────────────────────    4
  3218.         │        │         └ 0 04 003 ─── DAY ────────────────────────    6
  3219.         │        │
  3220.         │        │         ┌ 0 04 004 ─── HOUR ───────────────────────    5
  3221.         │        │3 01 012─┴ 0 04 005 ─── MINUTE ─────────────────────    6
  3222.         │        │         
  3223.         │        │         ┌ 0 05 002 ─── LATITUDE (coarse accuracy) ─   15
  3224.         │        └3 01 024─┤ 0 06 002 ─── LONGITUDE(coarse accuracy) ─   16
  3225.         │                  └ 0 07 001 ─── HEIGHT OF STATION ──────────   15
  3226.         │          
  3227.         │                  ┌ 0 10 004 ─── PRESSURE ───────────────────   14
  3228. 3 07 002┤        ┌3 02 001─┤ 0 10 051 ─── PRESSURE REDUCED TO MSL ────   14
  3229.         │        │         │ 0 10 061 ─── 3 HR PRESSURE CHANGE ───────   10
  3230.         │        │         └ 0 10 063 ─── CHARACTERISTIC OF PRESSURE ─    4
  3231.         │        │
  3232.         │        │         ┌ 0 11 011 ─── WIND DIRECTION ─────────────    9
  3233.         │        │         │ 0 11 012 ─── WIND SPEED AT 10m ──────────   12
  3234.         │        │         │ 0 12 004 ─── DRY BULB TEMP AT 2m ────────   12
  3235.         │        │         │ 0 12 006 ─── DEW POINT TEMP AT 2m ───────   12
  3236.         │        │3 02 003─┤ 0 13 003 ─── RELATIVE HUMIDITY ──────────    7
  3237.         │        │         │ 0 20 001 ─── HORIZONTAL VISIBILITY ──────   13
  3238.         │        │         │ 0 20 003 ─── PRESENT WEATHER ────────────    8
  3239.         │        │         │ 0 20 004 ─── PAST WEATHER (1) ───────────    4
  3240.         │        │         └ 0 20 005 ─── PAST WEATHER (2) ───────────    4
  3241.         │        │
  3242.         └3 02 011          ┌ 0 20 010 ─── CLOUD COVER (TOTAL) ────────    7
  3243.                  │         │ 0 08 002 ─── VERTICAL SIGNIFICANCE
  3244.                  │         │              SURFACE OBS ────────────────    6
  3245.                  │         │ 0 20 011 ─── CLOUD AMOUNT ───────────────    4
  3246.                  └3 02 004─┤ 0 20 013 ─── HEIGHT OF BASE OF CLOUD ────   11
  3247.                            │ 0 20 012 ─── CLOUD TYPE Cl ──────────────    6
  3248.                            │ 0 20 012 ─── CLOUD TYPE Cm ──────────────    6
  3249.                            └ 0 20 012 ─── CLOUD TYPE Ch ──────────────    6
  3250.                                                                         ──        
  3251.                                                         TOTAL BITS   270
  3252.  
  3253.      Figure 5-3. Example of surface observations with local descriptor
  3254.  
  3255.                    and data descriptor operator 2 06 Y
  3256.                                      
  3257.                                     
  3258.                                 Chapter 6
  3259.                                     
  3260.            Quirks, Advanced Features, and Special Uses of BUFR
  3261.  
  3262.                               J.D. Stackpole
  3263.                                
  3264. 6.1 Introduction.  This chapter is a slightly disparate
  3265. collection of odds and ends about BUFR:  it discusses some of the
  3266. advanced features that are sometimes overlooked in a casual
  3267. reading of the WMO Manual, some of the special uses to which data
  3268. represented in BUFR has been (or can be) put, and offers a fuller
  3269. explanation of some of the rather obscure portions of the WMO
  3270. description of the data representation system.
  3271.  
  3272. It also details some of the conventions adopted on an ad hoc
  3273. basis in those (few) cases where the current specifications of
  3274. BUFR are a little bit ambiguous.  It is expected that what is
  3275. described in this context will find its way into the published
  3276. specifications all in good time.
  3277.  
  3278. In part, this chapter is necessary because it is turning out,
  3279. with experience,  that BUFR is indeed a very powerful data
  3280. representation system.  As people work with the system, they
  3281. recognize new possibilities that were not thought of in the
  3282. original design.  Sometimes these new possibilities fit right in
  3283. to the existing system, as though they were implicitly present
  3284. from the beginning, othertimes they require a slight (or not so
  3285. slight) augmentation of the BUFR rules and/or descriptors to
  3286. implement the ideas.  The latter must be done with care, of
  3287. course, so as not to build any (violent) inconsistencies into
  3288. BUFR.  Some of the more promising proposals for change are
  3289. discussed in this chapter, but are clearly indicated as such.
  3290.  
  3291. Also, this chapter is (unfortunately) necessary because some of
  3292. the features (advanced or not) of BUFR are none too clearly
  3293. spelled out in the necessarily limited confines of the WMO
  3294. Manual.  Experience has shown that some of the rules and
  3295. regulations get overlooked and/or misinterpreted in their
  3296. application.  It is hoped that this chapter, and this Guide in
  3297. general, will help to alleviate these sorts of problems.
  3298.  
  3299. BUFR sets out to do a lot; this, in turn, does lead to
  3300. complexity.  There is no free lunch.
  3301.  
  3302. As an organizing structure, each Section of a BUFR message/record
  3303. will be dealt with in their regular order.
  3304.  
  3305. 6.2 Section 0 - Indicator Section.
  3306.  
  3307. 6.2.1 Edition Number Changes.  There hasn't been any particular
  3308. difficulty with this section except perhaps for the "Edition
  3309. Number", currently 2, of the BUFR system.  The Edition Number will
  3310. change only if there is a structural change to the data
  3311. representation system such that an existing and functioning BUFR
  3312. decoder would fail to work properly if given a "new" record to
  3313. decode.  A change or augmentation to Tables A, B, D, or the code
  3314. and flag tables would not involve defining a new Edition for BUFR;
  3315. one would, of course, be required to change corresponding tables in
  3316. a computer program but the logic of the program would not have to
  3317. be changed.  Changing tables is easy; changing program logic is not
  3318. so easy.  The former is, indeed, what BUFR is all about.
  3319.  
  3320. Edition changes can come about in three main ways.  For one, if the
  3321. basic bit or octet structure of the BUFR record was changed, by the
  3322. addition of something new in one of the "fixed format" portions of
  3323. the record, say, this would obviously require computer program
  3324. changes to work properly.  The change from Edition 1 to 2 involved
  3325. just such a change - see the remarks in Section 1.2.1.  These
  3326. changes are expected to be kept to a bare minimum by the WMO
  3327. community.
  3328.  
  3329. A second way that an edition change can come about is if the data
  3330. description operators, in Table C, are augmented.  These operator
  3331. descriptors are qualitatively different from simple data
  3332. descriptors: where the data descriptors just passively describe the
  3333. data in the record, the operator descriptors are, in effect,
  3334. instructions to the decoding program to undertake some particular
  3335. action - just what actions are possible are those defined by Table
  3336. C.  Descriptors of type 1 (F=1), the replication operators, are
  3337. also in this category - they tell the computer program to do
  3338. something - but there is little room for change as they are
  3339. currently defined.  Clearly, if some new (and presumably useful)
  3340. "operation" is defined, by inclusion of an operator in Table C, any
  3341. decoding programs will have to be modified to respond properly. 
  3342. The descriptor 2 06 YYY (the "skip local descriptor" operator) was
  3343. one such addition made in the conversion from Edition 1 to Edition
  3344. 2.
  3345.  
  3346. Unfortunately, not all of the "operator" descriptors are collected
  3347. in Table C.  Some of the nominal data descriptors, in particular
  3348. the "increment" descriptors found in Table A, Classes 4, 5, 6, and
  3349. 7,  take on the character of operators in conjunction with data
  3350. replication (Regulation 94.5.4) and the operator qualifiers in
  3351. Table A, Class 31.  This will be expanded on further below. 
  3352. However, it is clear that changes or augmentations to the general
  3353. process of replication, including increments, would involve
  3354. defining a new Edition of BUFR.
  3355.  
  3356. A third change that would require a new Edition would be a change
  3357. of the Regulations and/or many of the various notes scattered
  3358. through the documentation.  (The "notes", by the way, are as
  3359. important as the "Regulations" in formally defining BUFR - they
  3360. contain many of the details that flesh out the rather sparse
  3361. regulations.  Ignore them at your peril.)  This is not particularly
  3362. likely to happen - more likely will be clarifications to the
  3363. Regulations or notes that will serve to make the rules more precise
  3364. in (currently) possibly ambiguous cases.  This may result in a
  3365. tightening of a rule (or an interpretation)  that may require a
  3366. current "inappropriate" practice to be eliminated; whether this
  3367. should be considered as requiring an Edition number change is a
  3368. matter of some judgment.  The WMO will be the final arbiter.
  3369.  
  3370. 6.2.2  Maximum Size of BUFR Records.  As noted elsewhere, there is
  3371. no theoretical limit to the size of a BUFR message.  The largest
  3372. that can be accommodated by Octets 5-7 would be almost 17 mega-
  3373. octets (megabytes) but a single bulletin of that size would be a
  3374. bit much for the WMO Global Telecommunications System (GTS).  By
  3375. general international agreement single messages should be kept to
  3376. less than 15,000 octets (15 kilobytes); 10,000 octets is a good
  3377. safe number to use to be assured that GTS switching centers won't
  3378. inadvertently truncate the bulletins as they pass them on.  A still
  3379. "experimental" (in WMO terms) feature called BLOK will soon be
  3380. available to break up large BUFR (and GRIB) records into sizes that
  3381. the GTS can handle without difficulty.  It is better, however, that
  3382. such large records not be generated in the first place.  
  3383.  
  3384. 6.3  Section 1 - Identification Section.
  3385.  
  3386. 6.3.1  Master Tables, Version Numbers, and Local Tables.
  3387. At present there are no (known) Master Tables for BUFR other than
  3388. the meteorological set published in the WMO Manual On Codes.  That
  3389. is not to say that such could not exist.  That is one of the major
  3390. strengths of BUFR: any scientific discipline interested in
  3391. transmitting, storing, or even data basing information unique to it
  3392. can define its own set of Tables and take advantage of
  3393. meteorological experience in using the BUFR system.
  3394.   
  3395. As is noted elsewhere in this document, only the upper left portion
  3396. of the (Class by Entry) matrix of descriptors has been defined in
  3397. the current Master Table B - Classes 00 through 31, Variable number
  3398. of entries in each class - in the current WMO documentation. 
  3399. Classes 48 through 63 are for local use - this means that any group
  3400. may define anything they please for those classes; the same is true
  3401. for Entries 192 through 255 in any Class.  The other classes, and
  3402. whatever unused entries are not spoken for in each class, are set
  3403. aside for future international usage.  Some of the Classes, Class
  3404. 2 - Instrumentation in particular, are getting alarmingly crowded. 
  3405.  
  3406. Elements can be added to the international portion of the tables on
  3407. rather short notice by eliciting the coordinating cooperation of
  3408. the WMO Working Group on Data Management (WGDM), Sub-Group on Data
  3409. Representation and Codes (SGDRC).  International notification of
  3410. such additions is accomplished by the World Weather Watch (WWW)
  3411. Monthly Operations Letter.  The WMO body that is parent to the
  3412. WGDM, the Commission on Basic Systems  (CBS), meets every two years
  3413. or so and, upon CBS approval, the additions to the tables will be
  3414. published by the WMO.  At that point the Tables acquire a new
  3415. version number.  At present the Tables stand at Version 2.  This
  3416. relatively informal method of adding to the tables is possible
  3417. because the BUFR community is, at present, rather small.  It is
  3418. also possible because of the agreed upon convention that ONLY
  3419. additions will be made to Tables B or D by this method, descriptors
  3420. will neither be deleted nor changed, thus existing messages and
  3421. decoding tables will not be effected as long as they have no need
  3422. to make use of the new data descriptors.  
  3423.  
  3424. The SGDRC meets from time to time to study and recommend changes
  3425. that may involve the structure of BUFR or more substantial changes
  3426. to the Tables, such as the addition of new operator descriptors or
  3427. the possible elimination of old and unused descriptors.  This
  3428. latter step will be taken with great care, however, so as to not
  3429. make old archives of BUFR data inaccessible.  Such recommendations
  3430. will wend their way through the WMO system, eventually appearing as
  3431. new Versions of the Tables, upon approval of the CBS.  Because the
  3432. Version number of the Tables is part of the BUFR message, it is
  3433. only a bookkeeping device for a decoding program to note the
  3434. Version number and then extract the appropriate Table version from
  3435. some computer files.  The WMO publications will always contain the
  3436. latest Version of  the Tables; it is up to the various
  3437. meteorological computer centers to maintain their own files of
  3438. previous versions as well as their own local tables, of course.
  3439.  
  3440. The Local portions of the Tables can be updated, changed,
  3441. augmented, etc. at will by the local group concerned.  No
  3442. international notice is required or expected.  It is presumed that
  3443. bulletins containing local descriptors will not be sent out
  3444. internationally (but see the discussion of descriptor 2 06 YYY for
  3445. an exception).
  3446.   
  3447. "Local", although not defined in the BUFR documentation, is
  3448. generally taken to mean "within the processing center that is
  3449. generating the BUFR messages", and not necessarily one country. 
  3450. The U. S. has a number of processing centers (the civilian weather
  3451. service, Air Force, Navy, and other groups as well, each
  3452. potentially identified by a unique processing center number) each
  3453. one of which is free to use the "local" portions of the BUFR tables
  3454. as they see fit.
  3455.  
  3456. 6.3.2 Originating Center (or Centre).  The rather arcane method of
  3457. calculating the number of the originating center described in the
  3458. Manual arises out of a little history.  GRIB (FM 92) was developed
  3459. first and adopted a pre-existing WMO table of meteorological
  3460. centers.  It is a list of mainly large world and regional
  3461. meteorological centers that could be expected to have the computer
  3462. facilities required to generate GRIB bulletins if they had occasion
  3463. to do so.  When BUFR was developed it was realized that
  3464. observational data could originate from far more locations that the
  3465. GRIB table could accommodate.  Since, in turn, it was recognized
  3466. that the vast majority of such meteorological data originating
  3467. locations were already identified by the International Civil
  3468. Aviation Organization (ICAO), it made the task of identifying BUFR
  3469. originating centers easy.  The algorithm was then developed to
  3470. convert the ICAO identifier into a unique number that fit within
  3471. the two octets of space available.
  3472.  
  3473. ICAO Document 7910, containing the four-letter code ICAO "Location
  3474. Indicators" is available from:
  3475.  
  3476. Document Sales Unit
  3477. International Civil Aviation Organization 
  3478. 1000 Sherbrooke St. West,  Suite 400
  3479. Montreal, Quebec
  3480. Canada H3A  2R2
  3481.  
  3482. The price was (US) $16.50 in 1990 - it is probably more now.  The
  3483. same information (or a subset of it) can be found in WMO
  3484. Publication 9, Volume C.  The ICAO location identifier also forms
  3485. the "CCCC" part of the WMO standard Abbreviated Heading for all
  3486. weather messages, as described in Publication 386.  Note the rule
  3487. that if there is a GRIB Table 0 entry already in place for an
  3488. originating center, that same number should be used for BUFR data
  3489. messages generated at and sent from that location.
  3490.  
  3491. 6.3.3 Update Sequence Number.  This feature does not seem to have
  3492. wide use, as yet, but it is a powerful one.  Note that the rule
  3493. does require one to re-send an entire message if even only one
  3494. element in the message is a correction of a previous message
  3495. element.  The "associated field" (see more on this later) is used
  3496. to indicate which element(s) is(are) the corrected one(s) within
  3497. the total message.
  3498.  
  3499. 6.3.4 Optional Section 2.   This section is not usually sent in
  3500. international messages but it is put to use in some computer
  3501. centers that use BUFR, frequently in a data base context.  Some
  3502. samples are given below.  If it is present, the flag in octet 8
  3503. must be set, of course.
  3504.  
  3505. 6.3.5 BUFR Message Sub-Type.  This is purely a local option.  As an
  3506. example here are the sub-types currently in use at the National
  3507. Meteorological Center, Washington.  This sort of information is
  3508. useful in processing the observational data after it has been
  3509. decoded from BUFR.  By knowing ahead of time, so to speak, in
  3510. considerable detail just what sort of data is in a BUFR message, it
  3511. can make the choice of subsequent processors that much easier.  It
  3512. also makes it possible to search through a collection of various
  3513. data types, encoded in BUFR, and select out only those for which
  3514. there is a special interest.  This has obvious applications in a
  3515. data base context.
  3516.  
  3517.  
  3518.  
  3519. BUFR Data Category 0:    Surface data - land
  3520.  
  3521. Data Sub-type    Description
  3522.             0    Unassigned
  3523.             1    Synoptic - manual
  3524.             2    Synoptic - automatic
  3525.             3    Aviation - manual
  3526.             4    Aviation - AMOS
  3527.             5    Aviation - RAMOS
  3528.             6    Aviation - AUTOB
  3529.             7    Aviation - ASOS
  3530.             8    Aviation - METAR
  3531.             9    Aviation - AWOS
  3532.  
  3533. BUFR Data Category 1:    Surface data - sea
  3534.  
  3535. Data Sub-type    Description
  3536.             0    Unassigned
  3537.             1    Ship - manual
  3538.             2    Ship - automatic
  3539.             3    Drifting buoy
  3540.             4    Moored buoy
  3541.             5    Land based C-MAN station
  3542.             6    Oil rig or platform
  3543.             7    Sea level pressure bogus
  3544.             8    Moisture bogus
  3545.             9    SSMI
  3546.  
  3547.  
  3548. BUFR Data Category 2:    Vertical soundings (other than satellite)
  3549.  
  3550. Data Sub-type    Description
  3551.             0    Unassigned
  3552.             1    Rawinsonde - fixed land
  3553.             2    Rawinsonde - mobile land
  3554.             3    Rawinsonde - fixed ship
  3555.             4    Rawinsonde - mobile ship
  3556.             5    Dropwinsonde
  3557.             6    Pibal
  3558.             7    Profiler
  3559.  
  3560.  
  3561. BUFR Data Category 3:    Vertical soundings (satellite)
  3562.  
  3563. Data Sub-type    Description
  3564.             0    Unassigned
  3565.             1    Geostationary
  3566.             2    Polar orbiting
  3567.             3    Sun synchronous
  3568.  
  3569.  
  3570.  
  3571. BUFR Data Category 4:    Single level upper-air (other than
  3572. satellite):
  3573.  
  3574. Data Sub-type    Description
  3575.             0    Unassigned
  3576.             1    Aircraft - manual
  3577.             2    Aircraft - reconnaissance
  3578.             3    Aircraft - automatic (ASDAR)
  3579.             4    Aircraft - automatic (ACARS)
  3580.             5    Aircraft - automatic (AMDAR)
  3581.  
  3582.  
  3583. BUFR Data Category 5:    Single level upper-air (satellite):
  3584.  
  3585. Data Sub-type    Description
  3586.             0    Unassigned
  3587.             1    Cloud-tracked winds
  3588.             2    Water-vapor-tracked winds
  3589.  
  3590. 6.3.6 Date/Time.  The Manual suggests placing the date/time "most
  3591. typical for the BUFR message contents", whatever that may mean, in
  3592. the appropriate octets.  Obviously for synoptic observations the
  3593. nominal synoptic time is appropriate.  But note that the exact time
  3594. of the observation can be placed in the body of the message if this
  3595. is of interest or value to the users of the data.  Not only that,
  3596. but a collection of observation times (and exact locations) could
  3597. be incorporated into one observation to indicate, for example, the
  3598. times (and places) that a radiosonde balloon reached particular
  3599. levels in the atmosphere.   This possibility is getting serious
  3600. attention as very fine mesh numerical models with frequent analysis
  3601. update cycles are coming into operations.  A RAOB can take an hour
  3602. or more to complete its flight, and travel 40 or 50 km (or more)
  3603. downwind in that time.  That is clearly enough to place the high
  3604. level parts of the observation into both the next analysis update
  3605. cycle and at a neighboring gridpoint.  Reporting this level of
  3606. detail would require a major revision to the character based TEMP
  3607. Code (FM 35) but BUFR can accommodate this additional information
  3608. with no change whatsoever.  [End of commercial for BUFR!]
  3609.  
  3610. Collections of satellite observations, which are inherently
  3611. asynoptic, by convention will have the time of the first
  3612. observation of the collection in the date/time octets.  The exact
  3613. times for each observation will, of course, be in the body of the
  3614. message.
  3615.  
  3616. 6.3.7 "Reserved for use ...".  Here again is a playground for the
  3617. local center.  It is not expected that international BUFR messages
  3618. will contain anything past octet 18 (and that octet will be all
  3619. zeros per the rule that all Sections have an even number of octets)
  3620. but there is no real damage if Section 1 is "extended" past octet
  3621. 18.  That is because the "Length of Section" in octets 1-3 will
  3622. (should) indicate the full size of the section.  Any operational
  3623. decoding program worthy of the name will check the number in octets
  3624. 1-3 and respond accordingly, presumably by skipping the extra
  3625. material.
  3626.  
  3627. 6.4  Section 2 - Optional Section - Examples of Data Base Keys.
  3628.  
  3629. 6.4.1 U. S. National Meteorological Center Usage.  At the U.S.
  3630. National Meteorological Center (NMC) the Optional Section is being
  3631. used, internally, as a very simple data base key.  The actual data
  3632. are stored in data subsets (see below), i.e., individual
  3633. observations.  For each observation/subset there is a short
  3634. collection of information in Section 2, which looks like this:
  3635.  
  3636.           Content                            Element Size
  3637.  
  3638. Displacement from start of BUFR message
  3639. to start of subset (in units of octets)      2 octets
  3640. Latitude                                     2 octets
  3641. Longitude                                    2 octets
  3642. Day & hour                                   2 octets
  3643. Identification                               6 octets
  3644.  
  3645. The first of these 14 octet packets starts in octet 5 of Section 2,
  3646. with the others following without any break.  This rather minimal
  3647. set of information is enough to select out individual observations
  3648. using location and/or time criteria.  It is not necessary to decode
  3649. any of the observations to find the desired ones - the displacement
  3650. count tells you where to go to get each observation.
  3651.  
  3652. The alert reader will have noted a difficulty with the above
  3653. scheme:  in the BUFR system there is no requirement that data
  3654. subsets each start on an exact octet or word boundary; indeed it is
  3655. rather unlikely that they would, given the essentially random
  3656. nature of the bit lengths used to store data elements.  Yet the
  3657. "displacement" is specified in terms of octets.   Some sort of
  3658. padding is clearly necessary, so that as the BUFR record is
  3659. constructed each subset will start on a word (or half-word, or
  3660. octet) boundary in whatever machine is in use.  The actual padding
  3661. is easy: one simply invents a local descriptor (NMC uses 0 63 255)
  3662. which is specified to describe 1 bit of padding in the data section
  3663. without assigning any other "meaning" to the bit.  Then one places
  3664. a delayed replication descriptor (1 01 000, with its associated 0
  3665. 31 001 count descriptor) in front of the pad descriptor, with the
  3666. delayed count giving the number of bits inserted to generate a pad
  3667. of the proper length.  This works but leaves one with local
  3668. descriptors imbedded in the message - a problem if the message is
  3669. to be sent out non-locally at some future time.  It could be
  3670. expensive to go through the record, remove the padding, and
  3671. reconstruct a "pure" BUFR record for all the data.
  3672.  
  3673. But this can be resolved with the use of the "skip local
  3674. descriptor" descriptor, 2 06 YYY.  Just place it before the local
  3675. "pad" descriptor, change the XX of the delayed replication
  3676. descriptor to a value of 2, and the padded record can then be sent
  3677. out without causing any problems for recipients.  The whole thing
  3678. would look like this:
  3679.                                Descriptors          Values
  3680.                                    .                   .
  3681. Here is a fragment from            .                   .
  3682. an uncompressed BUFR              ddd1                vvv1
  3683. record (ignore blank lines)       ddd2                vvv2
  3684.                                   ddd3                vvv3
  3685. end of "real" data subset ------> ddd4                vvv4
  3686.  
  3687. Delayed rep. of two             1 02 000               -
  3688. descriptors n times;            0 31 001               n
  3689. n is the number of bits in
  3690. the pad, which follows the
  3691. 8 bits containing the n value
  3692.  
  3693. Skip local descriptor           2 06 001               -
  3694. Local pad descriptor            0 63 255            (one bit)
  3695.  
  3696. And that does it.
  3697.  
  3698. Another solution, of course, to the padding problem to create a new
  3699. international padding descriptor.  But since "padding" is machine
  3700. dependent it seems better to leave the padding up to the local
  3701. center and not make a regular practice of exchanging padded BUFR
  3702. messages.
  3703.  
  3704. 6.4.1.1 BUFR as a Data Base Storage System.
  3705. Once the observations/subsets are lined up on octet (or word)
  3706. boundaries it becomes quite feasible to use BUFR records as a
  3707. (simple) data base storage format.  One restriction applies: all
  3708. the data subsets must be the same size (i.e., no delayed
  3709. replications - see below) and not be compressed.  A common use of
  3710. a data base system is to extract one particular data element,
  3711. temperature, say, from all the available observations, for specific
  3712. time and geographic ranges.  To do so with "lined up" BUFR records
  3713. all that is necessary is to decode the first subset and take note
  3714. of the relative location of the temperature data in that subset. 
  3715. Then one simply extracts the temperature information from the
  3716. relative location in the other subsets without having to
  3717. (expensively) unpack the entire records.
  3718.  
  3719. Of course, this does not allow for all the features of a full
  3720. relational data base management system.  But it may well be
  3721. sufficient for some more limited uses.  It does have the advantage
  3722. that data can be shared from center to center, and used in similar
  3723. data base systems, without the necessity of decoding the data (or
  3724. extracting it from an RDBMS) and re-encoding the data to transmit
  3725. it in a reasonably efficient format.  It already is in a reasonably
  3726. efficient transmission format.  It may be necessary to redefine the
  3727. "pad" on a different machine, but that can be done without
  3728. unpacking or repacking the entire record.
  3729.  
  3730. 6.5  Section 3 - Data Description Section. 
  3731.  
  3732. 6.5.1 Data Subsets.  "Data subsets" are variously defined in the
  3733. current BUFR documentation.  Conceptually, one subset is a
  3734. collection of "related meteorological data", quoting from the
  3735. Manual.  Continuing: "For observational data, each subset usually
  3736. corresponds to one observation", where "observation", in this
  3737. context, could mean one surface synoptic observation of a number of
  3738. specific elements, one radiosonde ascent, one profiler sounding,
  3739. one satellite derived sounding with radiances perhaps, or the like. 
  3740. No examples of non-observational data subsets are given, but a
  3741. typical one would be a message consisting of a collection of
  3742. numerical model forecasts of "soundings" at grid-points or other
  3743. specific locations.  Each forecast sounding (pressure, temperature,
  3744. wind, relative humidity, whatever, at the many levels of the model)
  3745. would then be one data subset.
  3746.  
  3747. A more precise (if slightly tautological) "operational" definition
  3748. shows up later on in Regulation 94.5.2:  "A data subset shall be
  3749. defined as the subset of data described by one single application
  3750. of this collection of descriptors."  In this context, the
  3751. "collection of descriptors" means ALL the descriptors included in
  3752. Section 3 of the BUFR message.  In other words, one pass through
  3753. the complete collection of descriptors will allow one to decode one
  3754. data subset from Section 4.  One then loops back in the descriptor
  3755. list for as many times as the data subsets count call for.  All of
  3756. the data, in Section 4, are properly described by repeated use of
  3757. the same set of descriptors.  
  3758.  
  3759. This does not imply that the data subsets are themselves identical
  3760. in format.  The use of delayed replication, as in a collection of
  3761. RAOBs with varying numbers of significant levels, could cause
  3762. variations in format (octet count) among data subsets.  But they
  3763. are still considered "subsets" in that the same set of descriptors
  3764. will properly describe each individual set.  The use of the delayed
  3765. replication descriptor is what makes this possible, and is what
  3766. delayed replication was designed for.
  3767.  
  3768. As noted in Chapter 5, certain descriptor operators, from Table C,
  3769. can be used to redefine reference values, data lengths, scale
  3770. factors, and add associated fields.  There is also a group of
  3771. descriptors which "remain in effect until superseded by
  3772. redefinition" (more on them below).   By common practice,  ALL of
  3773. these redefinitions or "remain in effect" properties are canceled
  3774. when one cycles back to reuse a set of descriptors for a new data
  3775. subset.  You wipe the slate clean and start as though it was the
  3776. first time.  This rule is NOT specifically stated in the Manual at
  3777. present, but presumably will be in the next update.
  3778.  
  3779. Of course, data subsets can be identical in format, i.e., have the
  3780. same number of octets in each subset.  This will always be the case
  3781. if delayed replication is avoided.   In this case one can compress
  3782. the data, as described in Chapter 4, and gain considerable
  3783. efficiency.  Chapter 4, in the interest of avoiding overwhelming
  3784. detail, doesn't mention that it is perfectly possible to compress
  3785. data elements to which have been attached associated fields.  The
  3786. catch is that every data element has to have an associated field
  3787. attached to it for the systematic compression to be possible.  This
  3788. may cut into the efficiency of the compression and should be
  3789. considered before undertaking such a project.
  3790.  
  3791. Even though data subsets may be compressed and, as a result, the
  3792. individual elements in each data subset are all reordered, the data
  3793. subset concept still holds.  The data subset count must be included
  3794. in the correct location, and must be correct, of course.  It is
  3795. impossible to decompress a message without that information; and
  3796. even if the data are not compressed the count is necessary to
  3797. retrieve all the data subsets in a given message.
  3798.  
  3799. A final note about subsets:  It is possible, within the BUFR
  3800. framework, to account for many subsets by the device of placing a
  3801. replication operator just in front of the set of descriptors that
  3802. define one subset and have that replication include the count of
  3803. all the subsets.  This in effect reduces the data down to just one
  3804. subset in that one would no longer cycle back and reuse the
  3805. complete set of descriptors (now including the replication
  3806. descriptor).  This is NOT a recommended procedure.  It is far
  3807. better to have the subset count "up front", so to speak, in octets
  3808. 5-6 of Section 3 if for no other reason that it gives the user an
  3809. indication of how much data he will have to contend with before the
  3810. decoding gets under way.
  3811.  
  3812. 6.5.2 Observed or "other data".  A brief note: the "other data"
  3813. flagged in octet 7 has been taken to mean forecast information,
  3814. such as a collection, from a numerical model, of forecast
  3815. "soundings" of wind, temperature, humidity, whatever, at the
  3816. various internal layers or levels of the model, at a collection of
  3817. grid points or interpolated locations.  The time significance
  3818. qualifier (0 08 021) is used to indicate that the hours associated
  3819. with each sounding are indeed forecast hours.  The initial time of
  3820. the forecast is given as an unqualified date/time group, and it is
  3821. in the message prior to the 0 08 021 descriptor.
  3822.  
  3823. 6.5.3 Data Descriptors.  Here is where we shall discuss some of the
  3824. advanced, tricky, quirky, or special features about descriptors. 
  3825. Perforce, there will be collateral discussions of the data which
  3826. those descriptors set out to describe.  Much of what is discussed
  3827. here is in the nature of meta-rules about descriptors, in that it
  3828. deals with the proper interpretation of some special descriptors
  3829. and interpretation of special combinations of descriptors.  
  3830.  
  3831. Descriptors, in isolation, are rather straight-forward: one
  3832. descriptor describes one piece of data, one to one (or in the case
  3833. of Class D descriptors, one to many).  The special rules discussed
  3834. here go beyond that - some are, in effect, the rules that an
  3835. application program needs to "know", given that a set of
  3836. (presumably decoded) data, with associated descriptors, is
  3837. presented to it.  The application program has to "know" the
  3838. "meaning" of  these special descriptors, or patterns of
  3839. descriptors, to handle the data properly and deliver to the end
  3840. user what the constructor of the BUFR message intended.  Some of
  3841. the meta-rules are also in the nature of operator descriptors that
  3842. the BUFR decoding program itself has to "know" in order to
  3843. reconstruct the original data.  Of course, the creator of such BUFR
  3844. messages has to know and follow the rules as well.
  3845.  
  3846. Perhaps all this generalization will come clearer when we deal with
  3847. specific examples.
  3848.  
  3849. 6.5.3.1 Descriptors for "Coordinates".  The descriptors in Classes
  3850. 00 through 09 (with 03 and 09 at present reserved for future use)
  3851. have a special meaning added to them over and above the specific
  3852. data elements that they describe.  They (or the data they
  3853. represent)  "remain in effect until superseded by redefinition". 
  3854. By this is meant that the data in these classes serve as
  3855. coordinates (in a general sense) for all the following
  3856. observations.  Once you encounter an 0 04 004 (which describes the
  3857. "hour") one must assume that the hour (a time coordinate) applies
  3858. to all the following observations, until either another 0 04 004
  3859. descriptor is encountered or you reach the end of the data subset.
  3860.  
  3861. Obviously the familiar coordinates (two horizontal dimensions -
  3862. Classes 05 and 06 - a vertical dimension - 07 - and time - 04) are
  3863. in this subcategory of descriptors, but so are some features that
  3864. one might not think of as "coordinates", other than in a general
  3865. sense.  Forms of "identification" of the observing platform (block
  3866. and station number, aircraft tail number, etc.) are  "coordinates"
  3867. in this sense, in that they most certainly apply to all the
  3868. observations taken from that platform and they "remain in effect
  3869. until superseded by redefinition".  The instrumentation that is
  3870. used to take the measurements (Class 02) also falls in the same
  3871. category - it applies to all the actual observations because all
  3872. the observations were made with that particular instrument.  (A lot
  3873. of the instrumentation class deals with details of radar - there
  3874. seems a lot more to say about such equipment than, say, a
  3875. thermometer.  But if reporting details about the thermometer
  3876. [mercury vs. alcohol vs. bimetalic strips, say] became important
  3877. this information could be added to Class 2 without difficulty.)
  3878.  
  3879. A source of confusion can arise by noting that some parameters
  3880. (height and pressure, for example) appear twice in the Tables: in
  3881. Class 07 and again in Class 10.  Which table descriptor is
  3882. appropriate depends on the nature of the measurement that involves
  3883. these parameters.  A radiosonde, which measures wind, temperature,
  3884. and humidity (and geopotential height by calculation) as a function
  3885. of pressure, would report the pressure values using Class 07 (the
  3886. vertical coordinate or independent variable) and the other
  3887. parameters from the non-coordinate classes (10 for geopotential,
  3888. 11, 12, and 13 for the others).  An aircraft radar altimeter, on
  3889. the other hand, might measure pressure (and use Class 10 to report
  3890. the value) as a function of height (Class 07).  
  3891.  
  3892. Yet another kind of "coordinate" is imbedded in Class 8 -
  3893. Significance Qualifiers.  These are a way of reporting various
  3894. qualitative pieces of information about the (following) data
  3895. elements, beyond their numeric values, that can be important to the
  3896. user of the data.  A problem of how to "cancel" significance has
  3897. come up - there are cases where it makes no sense to have a
  3898. particular kind of significance "remain in effect" for the rest of
  3899. the message (or to the end of the data subset) but there is no
  3900. explicit way to cancel it.  A convention has been more or less
  3901. agreed to that sending a "missing" from the appropriate table has
  3902. the effect of canceling whatever significance was previously
  3903. established from that table.  Presumably, this convention will
  3904. become a rule (or footnote) in a future printing of the BUFR
  3905. manual.  
  3906.  
  3907. There is an exception to the "remain in effect until redefined"
  3908. rule:  when two identical descriptors, from Classes 04 to 07, are
  3909. placed back to back, that is to be interpreted as defining a range
  3910. of coordinates.  In this way an area, a volume, a span of time, or
  3911. all three together, can be defined as needed.  If the same
  3912. descriptor shows up later on in the message, then that appearance
  3913. does indeed redefine that particular coordinate value.  The others
  3914. still remain in effect.
  3915.  
  3916. Unfortunately some coordinate-like information has appeared in a
  3917. Table outside the Class 00-09 range - it escaped somehow.  Class 25
  3918. - Processing information, largely dealing (again!) with radar
  3919. information, contains information that by its nature "remains in
  3920. effect until superseded".  It should be considered as a
  3921. "coordinate" class and most likely will get such an official
  3922. designation in the future.  This will not involve any changes to
  3923. the structure of BUFR or the tables, only a change in
  3924. interpretation, or "meaning", of the data elements.
  3925.  
  3926. There is not much a general BUFR decoder program can do with this
  3927. "coordinate " information, other than decode it and pass the
  3928. information on to some follow-on applications program.  As noted in
  3929. the introduction to this sub-section, it is up to the applications
  3930. program (or the human reading a decoded message) to supply the
  3931. interpretation and the meaning of what is there, and then to act
  3932. accordingly.  Some of the interpretation is straightforward, almost
  3933. second nature.  "Obviously" the station identification applies to
  3934. the following observations made at that station; "obviously" this
  3935. pressure level is where the RAOB measured the wind and temperature;
  3936. perhaps not so obvious is the fact that two consecutive azimuth
  3937. values define a sector in which a hurricane is located.  Making the
  3938. "obvious" explicit with rules, regulations, and footnotes is part
  3939. of what BUFR is all about.  The developers of BUFR made every
  3940. effort to EXCLUDE as much "self-evident" information as possible
  3941. and instead require that "meaning" be specified by definite rules -
  3942. that is, in part, what makes the system so powerful. [End of second
  3943. commercial!]
  3944.  
  3945. 6.5.3.2 Replication, Increments and "Run-length encoding".  As
  3946. described in Chapter 3, replication (a descriptor with F=1) is
  3947. pretty straightforward.  Even delayed replication is no real
  3948. problem (except to someone writing a program to do it correctly). 
  3949. In either case, you just replicate the following X descriptors Y
  3950. times ("Y" can be either part of the descriptor or found in the
  3951. data section) and that is it.  This allows you to encode and
  3952. describe a potentially very large amount of data with relatively
  3953. few descriptors.  Very powerful feature.
  3954.  
  3955. The only slightly tricky matter is to keep mind that the 0 31 YYY
  3956. descriptor that follows the delayed (Y=0) replication descriptor is
  3957. not included in the count of descriptors to be replicated, the XX
  3958. part of 1 XX YYY.   Indeed the descriptors of Class 31 hold a
  3959. unique position in BUFR.  With one (partial) exception, they are
  3960. never used in isolation, but always in conjunction with some other
  3961. descriptor in order to "complete" the latter's function.  The
  3962. exception is 0 31 021 - it can be used alone to redefine the
  3963. meaning of a previously established associated field.  Class 31
  3964. descriptors are not included in the replication counts for
  3965. replication descriptors (nor are they replicated), and their
  3966. characteristics are not altered by any of the operator descriptors
  3967. in Table C, even those that change a characteristics of every
  3968. (other) Table B descriptor.  They are "Teflon" descriptors: they
  3969. stick to other descriptors but nothing sticks to them.
  3970.  
  3971. A rather ingenious "extension" to the delayed replication concept
  3972. has come into use recently.  This is one of those "unrecognized
  3973. possibilities" of BUFR mentioned previously.  The idea is simple:
  3974. set up delayed replication but have the replication count (in the
  3975. data section) be equal to zero.  By a simple extension of the
  3976. rules, this clearly means that the "following X descriptors shall
  3977. be replicated zero times", that is, they don't get used at all,
  3978. they should be skipped over - there is nothing in the data section
  3979. corresponding to them.  This is quite useful in that it allows one
  3980. to set up a standard or all inclusive set of descriptors for a
  3981. variety of observation types but then tailor the use of the
  3982. descriptors, by setting the replication count to 1 or 0, to fit the
  3983. actual data in hand.  It is considerably more efficient than
  3984. filling in the "missing" data (all 11111 bits) in the locations in
  3985. the data section where there is no real observation.  A particular
  3986. example of this is in "vertical soundings", whether generated by
  3987. RAOBs, satellites, profilers, dropsondes, etc.  They all share a
  3988. basic common structure but some lack whole classes of data -
  3989. satellite soundings have no winds, for example.  The use of "zero
  3990. count replication" allows one to set up a single set of descriptors
  3991. for all of these observations with a net saving of space over
  3992. either setting a lot of "missings" in the data or maintaining a
  3993. library of different sounding descriptor sets.
  3994.  
  3995. The current descriptors allow zero count replication without any
  3996. changes in current tables.  However, to save a little more space,
  3997. the NMC (Washington) people have defined a 0 31 000 descriptor with
  3998. a 1-bit data length.  This allows a replication count of 1 or 0,
  3999. all that is needed.  This is not yet officially recognized (even
  4000. though it is within the international portion of the table), but
  4001. there seems little reason to doubt that it soon will be.  It is a
  4002. very useful idea.
  4003.  
  4004. When we turn to the few descriptors that define increments, and in
  4005. particular discuss the use of increments in conjunction with
  4006. replication, things get a little complex.  The rules get quite
  4007. precise and have to be adhered to closely.
  4008.  
  4009. Increments by themselves are not so bad.  One first establishes the
  4010. value of a coordinate that is capable of being incremented. 
  4011. Normally, that coordinate value would "remain in effect until
  4012. superseded" by the appearance of the same descriptor with a new
  4013. data value.  But the appearance of a descriptor for an increment
  4014. associated with that coordinate will also change the value of the
  4015. coordinate by the amount found in the data section.  The increment
  4016. descriptor must be in the same class as the data to be incremented
  4017. and must have the same units.  In the current BUFR tables there is
  4018. no built-in way to associate an increment uniquely with the
  4019. descriptor/value that is capable of being incremented.  This is
  4020. unfortunate as it means the decoder program must have special rules
  4021. encoded for each increment descriptor; it would be better to devise
  4022. a general rule to associate increments with the thing (or things)
  4023. to be incremented.  This is a project for the future. A sample is the best way to indicate the descriptor sequence when
  4024. increments and replication are combined:
  4025.  
  4026.      Descriptor     Interpretation
  4027.  
  4028.      0 04 004  Sets the value of the hour at one increment LESS   
  4029.                than the "starting" value.
  4030.           .
  4031.      dddd      assorted data may be placed here
  4032.      dddd      without influencing the replication to come
  4033.           .
  4034.      0 04 014  sets the value of the increment in hours and       
  4035.                increments the hour
  4036.      1 XX 000  set up (delayed) replication of "next" XX          
  4037.                descriptors
  4038.      0 31 001  replication count  (not included in the span of    
  4039.                replication XX)
  4040.           .
  4041.           .    XX descriptors to be replicated
  4042.           .
  4043.  
  4044. Regulation 94.5.4.3 says that when the increment descriptor just
  4045. proceeds the replication operator, as in this example, the
  4046. incrementing action takes place right along with the replication. 
  4047. Every time the descriptors are replicated the hour (in the example)
  4048. gets incremented, too.  Note also, that the hour gets incremented
  4049. right away, before the first pass through the XX descriptors. 
  4050. That's why the initial hour value (0 04 004) was given a value one
  4051. increment's worth less than the hour value needed for the first
  4052. iteration.
  4053.  
  4054. There is a refinement to this:  it is legitimate to place Table C
  4055. Operator Descriptors between the increment descriptor and the
  4056. associated replication operator without altering the rule that the
  4057. incrementing is associated with the replication.  This is to allow
  4058. for (temporary) redefinition of the data width, scale, whatever, of
  4059. the descriptors within the XX span of replication (and following
  4060. unless the changes are canceled), if necessary.  The class C
  4061. descriptors cannot be placed after the replication count descriptor
  4062. as they would then be subject to the replication which might not
  4063. work very well, nor can the class C descriptors be placed prior to
  4064. the increment descriptor itself as that means the increment
  4065. descriptor would have its characteristics changed, also not a good
  4066. thing.  Hence the refinement to the rule.  (Don't forget the other
  4067. rule, that Class 31 descriptors are not subject to change by Table
  4068. C descriptors.)
  4069.  
  4070. Another feature of replication is "run length encoding".  This is
  4071. enabled by replication followed by  the 0 31 011 (or 0 31 012)
  4072. descriptor.  Basically all it says is that in addition to
  4073. replicating the descriptors a number of times, the data elements
  4074. present in the data (as described by the set of descriptor to be
  4075. replicated) should be replicated as well. This is useful, of
  4076. course, when the original data, as it exists prior to BUFR
  4077. encoding, contains long runs of identical values, or long runs of
  4078. identical sets of data elements.  This is a familiar and very
  4079. straightforward form of data compression that can greatly increase
  4080. the efficiency of data representation in special cases.  Of course,
  4081. the run length encoding replication can be coupled with
  4082. incrementing of a coordinate; indeed it most likely would be as
  4083. there is commonly a need to specify the locations of the string of
  4084. replicated values.  
  4085.  
  4086. 6.5.3.3 The Associated Field.  Associated fields are generally for
  4087. the purpose of "saying something" extra about the particular data
  4088. element with which they are associated.  The most common use is in
  4089. the arena of "quality control", where some sort of "confidence"
  4090. indication is given.  Other applications are possible and can be
  4091. established by additions to Code Table 0 31 021.
  4092.  
  4093. Creating (or dealing with) an associated filed in a message is a
  4094. two step process.  The first is to establish the field and set the
  4095. number of bits that will precede all the data elements following
  4096. the appearance of the associated field operator (2 04 YYY).   YYY
  4097. is that number.  If 255 bits is not enough (good grief, why?) you
  4098. can keep adding more bits by repeating the operator.  You can also
  4099. generate compound associated fields by repeating the operator if
  4100. what you have to "say" about the data elements is complicated.
  4101.  
  4102. The second step is to define the meaning of those bits, i.e., how
  4103. they are to be interpreted by a user of the data.  This is done by
  4104. immediately following each 2 04 YYY descriptor with the usual Class
  4105. 31 descriptor, 0 31 021, which, by reference to the Code table 0 31
  4106. 021, establishes that meaning.  A little care is required here. 
  4107. Code Table 0 31 021 gives a (small) number of significance code
  4108. figures (all taking up 6 bits in the data) for different size
  4109. associated fields; obviously one must be consistent in setting an
  4110. associated field length and identifying the meaning of the bits in
  4111. the field.
  4112.  
  4113. Once an associated field is established, those extra bits must be
  4114. (are assumed to be) prefixed to every following data element, until
  4115. the associated field is canceled.  If the quality information has
  4116. no meaning for some of those following elements, but the field is
  4117. still there, there is at present no explicit way to indicate "no
  4118. meaning" within the currently defined meanings.  One must either
  4119. redefine the meaning of the associated field in its entirety (by
  4120. including 0 31 021 in the message with a data value of 63 -
  4121. "missing value") or remove the associated field bits by the
  4122. "cancel" operator: 2 04 000.  If multiple or compound associated
  4123. fields have been defined, each must be canceled separately.
  4124.  
  4125. 6.5.3.4 Changing Descriptors "On the Fly".  A set of descriptors
  4126. are defined in Class 00 which are used to describe descriptors. 
  4127. These have not had much international (or non-local) use to the
  4128. best of my knowledge but their purpose, of course, is to send new
  4129. international (or local) descriptors to interested parties for use
  4130. prior to some official publication.  But another "new possibility"
  4131. has been suggested, one that would seem to have considerable
  4132. potential value.  This "new possibility" is not defined in the
  4133. current BUFR specifications and, as will be obvious, would require
  4134. a new Edition number for BUFR as it would require changes in the
  4135. logic of a decoding program.
  4136.  
  4137. The suggestion is simple:  it should be considered legitimate to
  4138. send any descriptor, or collection of descriptors (new or currently
  4139. defined, international or local), imbedded in a message which
  4140. otherwise contains data.  Then the new descriptor(s), or the
  4141. redefined old one(s), may then be actually used in the remainder of
  4142. that message/record.  This affords a method of introducing new data
  4143. on the fly, so to speak, or to change specific descriptor
  4144. characteristics more selectively that can be done at present with
  4145. Table C (operator) descriptors.  Implementing this would, perforce,
  4146. require that the decoding program recognize the new descriptor and
  4147. then either add it to some internal table or use it to alter
  4148. portions of existing tables.   Either option would require new
  4149. rules to be promulgated and old decoders to be altered.  It doesn't
  4150. seem to be a very complicated modification.  This temporary change
  4151. to a descriptor would only hold for the one record or data subset
  4152. in that record in which the change is introduced.  The next BUFR
  4153. record would be assumed to contain only "standard" (i.e.,
  4154. published) descriptors until such time as more new ones are
  4155. introduced.
  4156.  
  4157. 6.5.3.5 BUFR Records in Archives.  A simple extension of the "new
  4158. possibility" rule in the previous section makes it possible to
  4159. alleviate a big concern about using BUFR records in long-term
  4160. archives, that is, the necessity to retain BUFR Tables through a
  4161. number of possible versions for an indefinite time span.  The
  4162. suggestion again is simple and rather obvious.  In any file of
  4163. (presumably many) BUFR records, the first such BUFR record should
  4164. contain nothing but a collection of all the descriptors that will
  4165. be used in all the other records in the file.  Such a record would
  4166. have a Table A data category value of 11.  The "new rule", then,
  4167. would be that the descriptors in the first record should be used
  4168. for decoding all the many records in the file.  Individual records
  4169. could also have redefinitions of descriptors, as above, but they
  4170. would hold for only the one record or data subset in that record. 
  4171. This is really not a rule about the structure of BUFR per se, but
  4172. is more of a suggestion for good data management where BUFR records
  4173. and files are involved.  Presumably such BUFR archive files would
  4174. remain intact and only be exchanged in toto.
  4175.  
  4176. This archive suggestion would not involve any changes to BUFR
  4177. itself (and hence no change to the Edition number) if the
  4178. construction of Tables B, C and D, based on what is found in the
  4179. first Table A = 11 record, was done externally to the decoding
  4180. process.  If the temporary change/addition to a descriptor was
  4181. allowed that would introduce a new Edition to BUFR.
  4182.                                  Chapter 7
  4183.  
  4184.                    Use of Binary Representation at ECMWF
  4185.  
  4186.                                 J.K. Gibson
  4187.  
  4188. 7.1 Introduction.  The principle function of the European Centre
  4189. for Medium-Range Weather Forecasts (ECMWF) is to produce daily a
  4190. medium-range (up to 10 day) forecast, and to distribute products
  4191. to its Member States.  A secondary role is to maintain an archive
  4192. of Meteorological Data, mainly for the support of internal
  4193. research, but also for the benefit of the Member States.
  4194.  
  4195. Since the forecasts are global in domain, and since the analyses
  4196. on which the forecasts are based use all available observational
  4197. data, the ECMWF archive is designed to meet the major need, which
  4198. is "case study" type retrieval of all data relating to one
  4199. analysis and/or forecast.  In fact, the entities stored within
  4200. the archive can be addressed at the level of single observations,
  4201. and single analysis of forecast "fields" (i.e. 1 parameter at one
  4202. level for all horizontal locations at one point in time).
  4203.  
  4204. Data within the applications environment are thus retained either
  4205. as whole observations (or sets of observations in the case of
  4206. satellite data), or as fields.  The same policy is followed for
  4207. archived data.  This enables applications to use on-line or
  4208. archive data without modification.  The WMO representations BUFR
  4209. and GRIB are used for observations and fields respectively. 
  4210. These forms, being machine independent, enable data to be
  4211. transported across the full range of mainframes, servers, and
  4212. workstations which currently comprise the ECMWF computational
  4213. facilities.
  4214.  
  4215. 7.2 Operational Data Management.  ECMWF receives observational
  4216. data from the WMO GTS via Bracknell and Offenbach. 
  4217. Meteorological messages from the GTS are passed as files using a
  4218. file transfer protocol.  Data are acquired, and stored message by
  4219. message in a structured message data base.
  4220.  
  4221. A pre-processing system, driven by the incoming messages,
  4222. converts the observations into BUFR, and received analysis and
  4223. forecasts products into GRIB.  The BUFR observations data are
  4224. stored in a reports data base (RDB), the GRIB products in a
  4225. fields data base (FDB).  The data base structures used allow
  4226. access either to individual BUFR or GRIB entities.  From this
  4227. point on, all applications use or generate data in BUFR and GRIB.
  4228.  
  4229. For each data assimilation cycle, observational data are
  4230. extracted from the RDB, and appropriate first guess and other
  4231. fields from the FDB.  The resulting analysis and new first guess
  4232. fields are written to the FDB.  The forecast from the 12:00 UTC
  4233. analysis is continued out to 10 days, and its fields written to the
  4234. FDB.
  4235.  
  4236. The analysis system compares observational data against the first
  4237. guess, against uninitialised and initialised analysis values, and
  4238. performs a number of validity checks.  Results from the (often
  4239. referred to as "feed-back" or "analysis statistics") are
  4240. represented in BUFR, and subsequently used by a number of
  4241. monitoring applications.
  4242.  
  4243. Products from analyses and forecasts are generated to the
  4244. individual requirements of each of the Member States.  Most
  4245. products are fields, generated in GRIB; some, however, represent
  4246. time series values of specific parameters at single points
  4247. throughout the forecast, and are generated in BUFR.
  4248.  
  4249. All observations for each day are extracted two days later
  4250. (allowing for complete reception), sorted, and added to the
  4251. archive.  A similar strategy is followed for the feed-back from the
  4252. analysis.  The global fields containing the analysis and forecast
  4253. results are also archived.
  4254.  
  4255. The archive retrieval mechanism has been developed to make the data
  4256. residence transparent to the user.  If a retrieve request can be
  4257. satisfied from on-line data (FDB or RDB) this is done.  If not, the
  4258. off-line archives can be accessed.  It is thus possible to
  4259. incorporate calls to the archive retrieval as the standard
  4260. interface to both on-line and off-line data, enabling operational
  4261. applications to run unchanged on archive data.
  4262.  
  4263. 7.3 Use of BUFR.  Observational data, when received, is first
  4264. converted to BUFR.  This is achieved through a set of pre-processes
  4265. which currently run on a VAX cluster.
  4266.  
  4267. Although experimentation has been done to investigate the
  4268. effectiveness of a relational data base, currently the operational
  4269. system uses a data base system developed in-house, using the VMS
  4270. indexed sequential file structure.  Each BUFR entity is uniquely
  4271. identified by a key.  This key, together with some additional
  4272. housekeeping information (such as time of receipt, time of pre-
  4273. processing, message origin, etc.) are retained in the optional
  4274. Section 2 of BUFR.  Information from this key is used for sorting
  4275. and post-processing within the archive retrieval system.
  4276.  
  4277. Whenever possible, the BUFR used to represent observational data
  4278. conforms strictly to the WMO standard.  The representation of
  4279. analysis feed-back or statistics data in BUFR is a somewhat more
  4280. recent development, and uses features of BUFR currently approved
  4281. for experimental use.  ECMWF experimentation using extensions has
  4282. illustrated that the basic principles involved are effective; it
  4283. has also revealed areas where some improvement is possible before
  4284. the experimental extensions are incorporated within the full BUFR
  4285. definition.  The concept of trying out new extensions to BUFR in a
  4286. full processing environment is extremely beneficial.  It enables
  4287. one or two centres to try out new concepts, determine their
  4288. validity, and possibly recommend improvements before they become
  4289. part of the full BUFR specification.
  4290.  
  4291. All of the observational data within ECMWF's archive from 1980
  4292. onwards have now been converted to BUFR.
  4293.  
  4294. In addition to the operational use of BUFR, the observational
  4295. archive is used extensively for research into better data
  4296. assimilation methods, and for the verification of forecasts
  4297. (operational and research) against observations.
  4298.  
  4299. Currently as a build up phase towards a project to re-analyse 15
  4300. years of data the ECMWF archives are being enhanced.  Data are
  4301. being added from cloud cleared radiances, from COADS, from the
  4302. Australian archive of PAOB data, and to resolve other known
  4303. deficiencies.  In addition all FGGE and ALPEX II-B data are being
  4304. converted to BUFR and added to the archives.  The re-analysis
  4305. project will result in BUFR feed-back data for the full 15 years,
  4306. 1979 through 1993.
  4307.  
  4308. 7.4 Use of GRIB.  GRIB has been in use at ECMWF for about 8 years,
  4309. and all results of forecasts and analyses (operational and
  4310. research) are generated and archived in this form.
  4311.  
  4312. Most Member States products are generated in GRIB and distributed
  4313. in this form.  This avoids complications due to the many different
  4314. types of computers in use at Member States.
  4315.  
  4316. In recent years the demand for ECMWF products world-wide in non-
  4317. real time has grown considerably.  Retaining the data in a standard
  4318. WMO representation form has enabled such demand to be met with a
  4319. minimum of re-processing.  Since GRIB handling is well understood
  4320. throughout the world it has also ensured a minimum of follow-up
  4321. action when data have been delivered, as most recipients have
  4322. little difficulty in handling the data.
  4323.  
  4324. Recently the ECMWF archive has been re-processed to generate GRIB
  4325. time series and monthly means.
  4326.  
  4327. GRIB products from the archive are used extensively for the initial
  4328. conditions for research experiments, and for the verification of
  4329. research experimental forecasts.
  4330.  
  4331. An extensive set of results from the re-analysis project will be
  4332. archived in GRIB, including monthly and seasonal means, and a
  4333. considerable number of additional statistics.
  4334.  
  4335. 7.5 Concluding Remarks.  Use of standard binary representation has
  4336. brought the following benefits:
  4337.  
  4338.      - machine independent data
  4339.      - efficient data representation
  4340.      - standard interfaces to applications
  4341.      - provision of data to external users in an acceptable form
  4342.      - simplified and efficient data management.
  4343.  
  4344. To date there are no known negative aspects.                                      
  4345.  
  4346.  
  4347.                                 APPENDIX A
  4348.  
  4349.                                 REFERENCES
  4350.  
  4351. 1.   Soderman, D. and Gibson, J.K. "The Specification for FM 94 
  4352.      BUFR". FM 94 BUFR Collected Papers and Specification. ECMWF,
  4353.      February 1988.
  4354.  
  4355. 2.   Stackpole, J. "Binary Universal Form for Data Representation
  4356.      (WMO Code FM 94 BUFR)".  FM 94 BUFR Collected Papers and 
  4357.      Specification. ECMWF, February 1988.
  4358.  
  4359. 3.   World Meteorological Organization Manual on Codes, Volume 1,
  4360.      International Codes, Part A - Alphanumeric Codes. 1988 
  4361.      Edition, Suppl. No. 2 (VII.1991)
  4362.  
  4363. 4.   World Meteorological Organization. Manual on Codes, Volume 1, 
  4364.      International Codes, Part B - Binary Codes. 1988 Edition, 
  4365.      Suppl. No. 3 (VIII.1991)
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.