eccodes/definitions/grib2/section.2.def

44 lines
1.6 KiB
Modula-2
Raw Normal View History

2020-01-28 14:32:34 +00:00
# (C) Copyright 2005- ECMWF.
2013-03-25 12:04:10 +00:00
position offsetSection2;
section_length[4] section2Length ;
2013-03-25 12:04:10 +00:00
meta section2Pointer section_pointer(offsetSection2,section2Length,2);
unsigned[1] numberOfSection = 2 :read_only;
alias tiggeSuiteID = zero;
# This is a workaround for TIGGE: allow creation of an 'empty' section 2
# so we can create bit-identical grib 2 files for backward compatibility
transient addEmptySection2 = 0;
if ( addEmptySection2 == 0 ) {
2013-07-23 17:06:45 +00:00
if ( grib2LocalSectionPresent==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 'grib2/tiggeLocalVersion.table' = 1 : dump;
template tiggeSection "grib2/local.tigge.[tiggeLocalVersion:l].def";
}
2019-10-25 14:42:57 +00:00
if(productionStatusOfProcessedData == 10 || productionStatusOfProcessedData == 11) {
# crra = Copernicus Regional ReAnalysis
codetable[2] crraLocalVersion 'grib2/crraLocalVersion.table' = 1 : dump;
template crraSection "grib2/local.crra.[crraLocalVersion:l].def";
}
2013-07-23 17:06:45 +00:00
codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump;
2021-02-06 13:07:35 +00:00
2013-07-23 17:06:45 +00:00
if (grib2LocalSectionNumber!=0) {
template_nofail local "grib2/local.[centreForLocal:l].def";
} else {
constant deleteLocalDefinition=1;
}
position offsetAfterCentreLocalSection;
}
2013-03-25 12:04:10 +00:00
}
section_padding section2Padding : read_only;