# Copyright 2005-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# 
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#

# START grib1::section
# SECTION 3, Bit-map section
#  Length of section
# (octets)
position offsetSection3;
section_length[3] section3Length ;
meta section3Pointer section_pointer(offsetSection3,section3Length,3);

#  Number of unused bits at end of Section 3
unsigned[1] numberOfUnusedBitsAtEndOfSection3 = 0: read_only;
alias unusedBitsInBitmap=numberOfUnusedBitsAtEndOfSection3;

#  Table reference:
unsigned[2] tableReference = 0 : dump;

position offsetBeforeBitmap;
meta geography.bitmap g1bitmap( tableReference,
                    missingValue,
                    offsetSection3,
                    section3Length,
                    numberOfUnusedBitsAtEndOfSection3) : read_only,dump;

position offsetAfterBitmap;

# END   grib1::section

padtoeven padding_sec3_1(offsetSection3,section3Length);
section_padding section3Padding;

meta md5Section3 md5(offsetSection3,section3Length);
