# 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.
#


#  Reference value (R)
# The copy_ok means that the value is copied when changing the representation
# e.g. from jpeg to simple packing.
ieeefloat   referenceValue  : read_only, copy_ok;
meta referenceValueError reference_value_error(referenceValue,ieee);


#  Binary scale factor (E)
signed[2]   binaryScaleFactor : read_only, copy_ok;

#  Decimal scale factor (D)
signed[2]   decimalScaleFactor ;

# Try different values of binaryScaleFactor and decimalScaleFactor to reduce packing error
transient optimizeScaleFactor = 0;


#  Number of bits used for each packed value for simple packing, or for each group reference value for complex packing or spatial differencing
unsigned[1] bitsPerValue;
alias numberOfBits = bitsPerValue;
alias numberOfBitsContainingEachPackedValue = bitsPerValue;

