mirror of https://github.com/ecmwf/eccodes.git
Testing: bitsPerValue max limit
This commit is contained in:
parent
ea8b5bde4c
commit
52a199013a
|
@ -120,9 +120,13 @@ res=`${tools_dir}/grib_get -p decimalScaleFactor,bitsPerValue ${data_dir}/gfs.c2
|
||||||
# Test increasing bits per value
|
# Test increasing bits per value
|
||||||
input=${data_dir}/sample.grib2
|
input=${data_dir}/sample.grib2
|
||||||
temp=temp.grib_bitsPerValue.grib
|
temp=temp.grib_bitsPerValue.grib
|
||||||
|
MAX_BPV=58
|
||||||
|
if [ $ECCODES_ON_WINDOWS -eq 1 ]; then
|
||||||
|
MAX_BPV=26
|
||||||
|
fi
|
||||||
stats1=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg,sd $input`
|
stats1=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg,sd $input`
|
||||||
grib_check_key_equals $input 'bitsPerValue,packingType' '16 grid_simple'
|
grib_check_key_equals $input 'bitsPerValue,packingType' '16 grid_simple'
|
||||||
for bpv in `seq 17 58`; do
|
for bpv in `seq 17 $MAX_BPV`; do
|
||||||
${tools_dir}/grib_set -M -s setBitsPerValue=$bpv $input $temp
|
${tools_dir}/grib_set -M -s setBitsPerValue=$bpv $input $temp
|
||||||
stats2=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg,sd $temp`
|
stats2=`${tools_dir}/grib_get -M -F%.3f -p min,max,avg,sd $temp`
|
||||||
[ "$stats1" = "$stats2" ]
|
[ "$stats1" = "$stats2" ]
|
||||||
|
|
Loading…
Reference in New Issue