File: section.02.def

package info (click to toggle)
eccodes 2.46.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 154,956 kB
  • sloc: cpp: 163,970; ansic: 26,310; sh: 22,006; f90: 6,854; perl: 6,361; python: 5,352; java: 2,226; javascript: 1,427; yacc: 854; fortran: 543; lex: 359; makefile: 279; xml: 183; awk: 66
file content (58 lines) | stat: -rw-r--r-- 2,764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# (C) Copyright 2005- ECMWF.

# Section 2 - Repetitions and Index Section

position offsetSection2;
section_length[4] section2Length ;
meta section2Pointer section_pointer(offsetSection2,section2Length,2);
unsigned[1] numberOfSection = 2 :read_only;

# Note 1: A message with only one field shall have the total number of repetitions and
# each of the number of distinct sections set to 1
unsigned[2] totalNumberOfRepetitions = 1 : dump;

# Note 2: Two repeated sections shall never be identical.
# If two sections are identical because they have the same content, one of the two shall be coded
# with only 7 bytes (empty section with reference) and the SUI shall be coded with the same value
# of the identical section to which this section refers. Each section  will therefore have content
# in it or refer to another section of the same section number. In the latter case, it will be made
# only of 7 bytes comprising section length (4 bytes), number of section (1 byte) and
# Section Unique Identifier - SUI (2 bytes)
unsigned[2] numberOfDistinctSection3s = 1: dump;
unsigned[2] numberOfDistinctSection4s = 1: dump;
unsigned[2] numberOfDistinctSection5s = 1: dump;
unsigned[2] numberOfDistinctSection6s = 1: dump;
unsigned[2] numberOfDistinctSection7s = 1: dump;
unsigned[2] numberOfDistinctSection8s = 1: dump;
unsigned[2] numberOfDistinctSection9s = 1: dump;

# Note 3: The inclusion of an Index template is optional. If index template is not present,
# the index template number shall be set to missing and the length of index template shall be set to 0
unsigned[2] indexTemplateNumber = missing() : dump,can_be_missing;
unsigned[4] lengthOfIndexTemplate = 0: dump,edition_specific;
template_nofail indexTemplate "grib3/template.2.[indexTemplateNumber:i].def";

#if ( addEmptySection2 == 0 ) {
#    if ( grib3LocalSectionPresent==1 or ( section2Length>5 or new() ) ) {
#        alias section2Used=one;
#
#        if(productionStatusOfProcessedData == 4 || productionStatusOfProcessedData == 5) {
#            # This is TIGGE-LAM because of the productionStatusOfProcessedData and the non-empty section 2
#            codetable[2] tiggeLocalVersion 'grib3/tiggeLocalVersion.table' = 1 : dump;
#            template  tiggeSection "grib3/local.tigge.[tiggeLocalVersion:l].def";
#        }
#
#        codetable[2] grib3LocalSectionNumber 'grib3/grib3LocalSectionNumber.[centreForLocal:l].table' = 1 : dump;
#
#        if (grib3LocalSectionNumber!=0) {
#            template_nofail local "grib3/local.[centreForLocal:l].def";
#        } else {
#            constant deleteLocalDefinition=1;
#        }
#        position offsetAfterCentreLocalSection;
#    }
#}

#section_padding section2Padding : read_only;

meta md5Section2 md5(offsetSection2,section2Length);