1# Copyright 2005-2018 ECMWF.
2#
3# This software is licensed under the terms of the Apache Licence Version 2.0
4# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5#
6# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
7# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
8#
9
10# moved here to allow different bitsPerValue in second order packing
11unsigned[1] bitsPerValue : dump ;
12alias numberOfBitsContainingEachPackedValue = bitsPerValue;
13
14# For grib1 -> grib2
15#constant dataRepresentationTemplateNumber = 50;
16
17ibmfloat realPart ;
18position offsetBeforeData;
19transient P=0;
20
21_if (gribex_mode_on()) {
22  transient computeLaplacianOperator=0 : hidden;
23} else {
24  transient computeLaplacianOperator=1 : hidden;
25}
26
27meta codedValues data_g1simple_packing(
28   section4Length,
29   offsetBeforeData,
30   offsetSection4,
31   unitsFactor,
32   unitsBias,
33   changingPrecision,
34   numberOfCodedValues,
35   bitsPerValue,
36   referenceValue,
37   binaryScaleFactor,
38   decimalScaleFactor,
39   halfByte
40): read_only;
41
42meta values data_g1shsimple_packing(codedValues,realPart) : dump;
43alias data.packedValues = values;
44meta numberOfCodedValues g1number_of_coded_values_sh_simple(bitsPerValue,offsetBeforeData,offsetAfterData,halfByte,numberOfValues) : dump;
45
46template statistics "common/statistics_spectral.def";
47