crex crex code form examples of crex messages sections of a crex message section 0 – indicator...

28
W O RLD M ETEO RO LO G IC AL O RG ANIZATIO N R A II/V ITraining Sem inaron Table-D riven C odes M uscat,O m an,10-14 D ecem ber 2005 CREX Eva C ervena, cervena@ chmi.cz CZECH H YDRO M ETEO RO LO G IC A L IN STIT U TE

Upload: luis-burke

Post on 27-Mar-2015

229 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

WORLD METEOROLOGICAL ORGANIZATION RA II/VI Training Seminar on Table-Driven Codes Muscat, Oman, 10-14 December 2005

CREX

Eva Cervena, [email protected]

CZECH HYDROMETEOROLOGICAL INSTITUTE

Page 2: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Code Form

Sections of a CREX message

CREX (and BUFR) Descriptors - CREX descriptors - Replication descriptors

CREX (and BUFR) Tables

- CREX Table A – Data Category - CREX Table B – Classification of Elements - CREX Table C – Data Description Operators - CREX Table D – Sequence Descriptors

CREX

Page 3: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Code Form

FM 95 CREX – Character Form for the Representationand Exchange of Data

Section 0 IndicatorSection

'CREX'

Section 1 Datadescriptionsection

CREX Master table number, edition number,table version number, data category, andcollection of descriptors, defining content ofData Section

(and optional check digit indicator 'E')

Section 2 Datasection

A set of data items defined by Section 1

Section 3 Optionalsection

'SUPP' followed by data items for local use

Section 4 End section '7777'

Page 4: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Examples of CREX messages

CREX++

T000104 A008 D07042++

11 649 Hradec Kralove 5018 01583 00285 2001 10 22 07 42 08 0364 001 98 06 00009 04 0291 09 0006 11 243++

7777 CREX++

T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038++

7777

Section terminator ’++’ terminates each of of the sections (with the exception of the End Section ‘7777’).

Page 5: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Sections of a CREX message

Section 0 – Indicator Section

CREX

Beginning of a CREX message

Page 6: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Section 1 - Data Description Section 

CREX++

T000104 A000 D01031 R02005 B07061 B12030++ 11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038++7777 

First group: Ttteevv T: Indicator for CREX Tables tt: CREX Master Table (00 for Standard WMO CREX Tables) ee: CREX Edition Number (currently 01) vv: CREX Table Version Number (currently 04)

Second group: Annn A: Indicator for CREX Table A nnn:Data category from CREX Table A

Third to n-th groups: A collection of descriptors Bxxyyy, Cxxyyy, Dxxyyy and/or Rxxyyy

Group n+1: E: Optional check digit indicator (not used in the above example)

Page 7: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Section 1 for CREX edition 2

Ttteevvbbww T: Indicator for CREX Tables tt: CREX Master Table ( 00 for standard WMO CREX tables) ee: CREX edition number (currently 02) vv: CREX table version number (currently 04) bb: BUFR Master Table version number (currently 12) ww: Version number of local tableAnnnmmm A: Indicator for CREX Table A nnn: Data category from CREX Table A mmm: International data sub-categoryPoooooppp P: Indicator for originating centre ooooo: Originating centre ppp: Originating sub-centreUuu U: Indicator of sequence number of message uu: Update sequence number ( 00 for original message) Ssss S: Indicator of number of subsets sss: Number of subsetsYyyyymmdd Y: Indicator of date yyymmdd: year, month, dayHhhnn H: Indicator of time hhnn: hour, minute

A collection of descriptors Bxxyyy, Cxxyyy, Dxxyyy and/or RxxyyyE: Optional check digit indicator

Page 8: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Section 2 - Data Section

Content of Section 2 - Data Section:Data values corresponding to the descriptors in Section 1. 

 

CREX++T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 /// 00100 038++7777 

Negative values:Only negative values are signed. The negative sign is not included into the number of characters allowed for the relevant group.Missing values:A missing value in Section 2 is represented by a string of solidi ‘/’ characters corresponding in number to the number of characters allowed for the relevant group.

Page 9: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX++

T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038++ 7777 CREX++

T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038+ 11 636 1 2000 01 03 06 00 4916000 01543917 00569 00005 001 00010 004 00020 009 00050 020 00100 043+ 11 659 1 2000 01 03 06 00 4958278 01576250 00533 00005 004 00010 007 00020 012 00050 023 00100 041+ 11 698 1 2000 01 03 06 00 4888333 01608333 00334 00005 007 00010 007 00020 014 00050 /// 00100 ///++ 7777 Subset terminator ’+’ terminates each data subset, with the exception of the last subset that is terminated by '++'.

Examples with one and more data subsets

Page 10: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

An Example without Optional Check Digits: CREX++

T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038++

7777

An Example with Optional Check Digits: CREX++

T000104 A000 D01031 R02005 B07061 B12030 E++

011 1487 21 32000 401 503 606 700 84946694 901384083 000519 100005 2-003 300010 4-001 500020 6002 700050 8018 900100 0038++

7777

Examples with and without Optional Check

Digits

Page 11: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

BUFR and CREX Descriptors

BUFRCREX

F Xxx

Yyyy

Elementdescriptor

BUFRCREX

0B

Class ofelement

descriptors

Identification ofthe descriptor

in its ClassReplicationdescriptor

BUFRCREX

1R

Number ofdescriptors

to bereplicated

Number ofreplications

Operatordescriptor

BUFRCREX

2C Operator Operand

Sequencedescriptor

BUFRCREX

3D

Categoryof sequencedescriptors

Identification ofthe descriptorin its Category

Page 12: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX descriptors

F xx yyy 1 letter 2 digits 3 digits

F = B Bxxyyy – Element descriptor (Table B entry)

F = C Cxxyyy – Operator descriptor (Table C entry)

F = D Dxxyyy – Sequence descriptor (Table D entry)

F = R Rxxyyy – Replication descriptor

Page 13: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Replication descriptors

Rxxyyyxx – number of descriptors to be repeatedyyy – number of times the data sequence is to be repeated

R02005 B07061 B12030 is equivalent to

B07061 B12030 B07061 B12030 B07061 B12030 B07061 B12030 B07061 B12030

Delayed replication yyy = 000– number of replications is given in Data Sectione.g. number of levels in vertical profiles

Page 14: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Usage of a replication descriptor

CREX++

T000104 A000 D01031 R02005 B07061 B12030++

11 487 1 2000 01 03 06 00 4946694 01384083 00519 00005 -003 00010 -001 00020 002 00050 018 00100 038+ 11 636 1 2000 01 03 06 00 4916000 01543917 00569 00005 001 00010 004 00020 009 00050 020 00100 043+ 11 659 1 2000 01 03 06 00 4958278 01576250 00533 00005 004 00010 007 00020 012 00050 023 00100 041+ 11 698 1 2000 01 03 06 00 4888333 01608333 00334 00005 007 00010 007 00020 014 00050 /// 00100 ///+ 11 710 1 2000 01 03 06 00 4965250 01695361 00510 00005 004 00010 003 00020 012 00050 025 00100 028++ 7777

Page 15: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX (and BUFR) Tables 

 

Table A - Data Category

Table B - Classification of Elements

Table C - Data Description Operators

Table D - List of Common Sequences

Page 16: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Table A - Data Category 

  Table A refers to the group Annn in Data Description Section and provides general classification of the data available.

BUFR and CREX use the same Table A.

Table A: nnn 000 - Surface data - land 001 - Surface data - sea 002 - Vertical soundings (other than satellite) 003 - Vertical soundings (satellite) 004 - Single level upper-air data (other than satellite) 005 - Single level upper-air data (satellite) 006 - Radar data . . . . . . 255 - Indicator for local use, with sub-category

Page 17: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Table B - Classification of Elements 

CREX Table B defines element descriptors Bxxyyy: xx – Class of Data Elements yyy – Identification of the Element within the Class

CREX element descriptors have three characteristics:

- Unit - Scale - Data Width

Reference value is not necessary (is always equal to 0), as CREX can depict negative values.

Page 18: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Entries in CREX Table B and BUFR Table B are listed underthe same Table Reference F = 0 .

CREXTABLEREFERENC

E

F X Y

TABLEELEMENT NAME UNIT SCALE

DATAWIDTH

(Characters)0 12 001 Temperature/dry-bulb

temperature°C 1 3

0 12 002 Wet-bulb temperature °C 1 30 12 003 Dew-point temperature °C 1 30 12 004 Dry-bulb temperature at 2 m °C 1 30 12 005 Wet-bulb temperature at 2 m °C 1 30 12 006 Dew-point temperature at 2 m °C 1 30 12 013 Ground minimum temperature,

past 12 hours°C 1 3

0 12 022 Minimum temperature at 2m °C 2 4

0 12 030 Soil temperature °C 1 3

An example of entries in CREX Table B

Page 19: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Unit 

Standard International (SI) units e.g. Pa, m s-1, kg m-2, J m-2 Standard common usage units e.g. °C, nbar, year Numeric e.g. for WMO station number, Number of flashes Character e.g. for Station or site name, Storm identifier Code Table e.g. for Present weather, Cloud type Flag Table e.g. for Vertical sounding significance 

Page 20: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Scale 

Scale S

measured value * 10S = encoded value Positive Scale

- B12001 (Temperature) has a scale of +1,

thus temperature 33.7°C is encoded as 33.7 * 10+1 = 337

- B12101 (Temperature) has a scale of +2,

thus temperature 33. 74°C is encoded as 33. 74 * 10+2 = 3374

Negative Scale

- B20001 (Horizontal visibility) has a scale of -1,

thus visibility 25 000 m is encoded as 25 000 / 10 = 2500

Page 21: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Data Width  

Data width is a count of how many characters is required to express the largest possible value of the element (after scaling).

Numeric values: Leading zeroes are included, if the value requires smaller number of digits than is defined by the data width: - B12001 (Temperature) has a data width of 3 (and scale 1),

thus temperature 1.4°C is encoded as 014.

Negative values: Only negative values are signed. The data width does not include the negative sign : - B12001 (Temperature) has a data width of 3 (and scale 1),

thus temperature - 1.4°C is encoded as -014.

Character values: Trailing blanks are included, if the value requires smaller number of digits than is defined by the data width.  

Page 22: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Flag Tables 

Flag Table: Combination of attributes may be chosen. A bit set to 1 indicates that the item is true, a bit set to 0 the item being false.

B02002 Type for instrumentation for wind measurement E.g. Wind is measured by certified instruments and in knots:

bit 1 Certified instruments true - bit 1 set to 1 bit 2 Originally measured in knots true - bit 2 set to 1 bit 3 Originally measured in km/h false - bit 3 set to 0 All 4 Missing value false - bit 4 set to 0 Octal representation requires the number of bits to be a multiple of 3:

 Bit chain: 0 0 1 1 0 0 Bit chain divided into two groups: 0 0 1 1 0 0 Octal representation: 1 4

Encoded value in a CREX message: 14 Note: A missing value is represented by a string of solidi ‘/’ characters.

Page 23: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Binary, Octal and Decimal Representation 

Binary r.: 0 0 0 0 * 2 2 + 0 * 2 1 + 0 * 2 0 = 0

1 1 1 1 * 2 2 + 1 * 2 1 + 1 * 2 0 = 7

Octal r.: 3 0 1 4 3 * 8 3 + 0 * 8 2 + 1 * 8 1 + 4 * 8 0 = = 1536 + 0 + 8 + 4 = 1548

Decimal r.: 3 0 1 4 3 * 10 3 + 0 * 10 2 + 1 * 10 1 + 4 * 10 0 = 3014

Page 24: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Another example - flag table 0 04 059 

B04059 Times of observation used to compute the reported mean values E.g. The mean values are computed using data from 00, 06, 12, 18 UTC:

bit 1 0000 UTC true - bit 1 set to 1 bit 2 0600 UTC true - bit 2 set to 1 bit 3 1200 UTC true - bit 3 set to 1 bit 4 1800 UTC true - bit 4 set to 1 bit 5 Other hours false - bit 5 set to 0 All 6 Missing value false - bit 6 set to 0  Bit chain: 1 1 1 1 0 0 Bit chain divided into two groups: 1 1 1 1 0 0 Octal representation: 7 4

Encoded value in a CREX message: 74

Page 25: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Table C - Data Description Operators 

CREX Table C defines operator descriptors Cxxyyy: xx – Operator yyy – Operand C01yyy - Data Width Replacement C02yyy - Scale Factor Replacement C05yyy - Character Insertion C07yyy - Units replacement

Example: C07201 changes the unit (e.g. of wind speed) to knot, C07741 changes the unit (e.g. of wind speed) to km h-1. Note: CREX operator descriptor applies only to the data value of the following element descriptor.

Page 26: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

CREX Table D - List of Common Sequences 

CREX Table D defines sequence descriptors Dxxyyy: xx – Category of Sequences yyy – Identification of the descriptor within the Category

Table D (sequence descriptors) is a device to reduce the length of the Data Description Section. One sequence descriptor may replace a defined collection of descriptors that may consist of element descriptors, replication descriptors, operator descriptors and also “lower” sequence descriptors:

D07061 = D01031 R01005 D07060

= D01001 B02001 D01011 D01012 D01022 R01005 D07060

= B01001 B01002 B02001 B04001 B04002 B04003 B04004 B04005 B05001 B06001 B07001 B07061 B12030 B07061 B12030 B07061 B12030 B07061 B12030 B07061 B12030

Page 27: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

A CREX message with a sequence descriptor

CREX++

T000104 A008 D07042++

11 649 Hradec Kralove 5018 01583 00285 2001 10 22 07 42 08 0364 001 98 06 00009 04 0291 09 0006 11 243++ 7777

CREX++

T000104 A008 B01001 B01002 B01015 B05002 B06002 B07001 B04001 B04002 B04003 B04004 B04005 B08021 B04025 B02143 B02142 B02144 B08022 B08023 B15001 B08023 B15001 B08023 B15002++

11 649 Hradec Kralove 5018 01583 00285 2001 10 22 07 42 08 0364 001 98 06 00009 04 0291 09 0006 11 243++ 7777 The sequence descriptor D07042 represents the sequence of element descriptors B01001 B01002 . . . . B15002 in the Data Description section of the second message.

Page 28: CREX CREX Code Form Examples of CREX messages Sections of a CREX message Section 0 – Indicator Section CREX Beginning of a CREX message

Local Tables 

The following portion of the Table B and Table D is reserved for local use:

xx – Class or Category from the range <48 to 63>

and / or

yyy – Entries from the range <192 to 255>.

Local part of the Tables may be used, updated, changed, etc.

No international notice is required or expected.