2014-01-03 16:22:21 +00:00
|
|
|
# Copyright 2005-2014 ECMWF.
|
2013-03-25 12:04:10 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2013-03-25 14:23:07 +00:00
|
|
|
#
|
2013-03-25 12:04:10 +00:00
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
lookup[1] ed (7,editionNumber);
|
|
|
|
|
|
|
|
ascii[4] identifier = "BUFR" : read_only,hidden;
|
|
|
|
alias ls.identifier=identifier;
|
|
|
|
|
|
|
|
if(ed < 2)
|
|
|
|
{
|
|
|
|
unsigned[3] section1Length;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
unsigned[3] totalLength ;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned[1] editionNumber = 2;
|
|
|
|
|
|
|
|
if(editionNumber < 2)
|
|
|
|
{
|
|
|
|
template section_1 "bufr/old_section.1.def" ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
template section_1 "bufr/section.1.def" ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flagbit section2Present(section1Flags,7) = 1;
|
|
|
|
|
|
|
|
if(section2Present){
|
|
|
|
template section_2 "bufr/section.2.def" ;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
transient section2Length = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
template section_3 "bufr/section.3.def" ;
|
|
|
|
template section_4 "bufr/section.4.def" ;
|
|
|
|
template section_5 "bufr/section.5.def" ;
|
|
|
|
|
|
|
|
if(ed < 2)
|
|
|
|
{
|
|
|
|
transient totalLength = section1Length + section2Length + section3Length + section4Length + 8;
|
|
|
|
}
|
|
|
|
|