diff --git a/tests/grib_change_packing.sh b/tests/grib_change_packing.sh index 29d7871f3..e28baa356 100755 --- a/tests/grib_change_packing.sh +++ b/tests/grib_change_packing.sh @@ -76,23 +76,24 @@ rm -f $temp # IEEE to Simple Packing # ----------------------- -input=${data_dir}/grid_ieee.grib -${tools_dir}/grib_set -r -s packingType=grid_simple $input $temp -grib_check_key_equals $input accuracy 32 -grib_check_key_equals $temp packingType 'grid_simple' -grib_check_key_equals $temp accuracy,bitsPerValue '32 32' -stats1=`${tools_dir}/grib_get -F%.2f -p skew,kurt $input` -stats2=`${tools_dir}/grib_get -F%.2f -p skew,kurt $temp` -[ "$stats1" = "$stats2" ] - -# 64bit IEEE - We can only do max. 32 with CCSDS -input=${data_dir}/reduced_gaussian_model_level.grib2 -${tools_dir}/grib_set -r -s packingType=grid_ieee,precision=2 $input $temp -grib_check_key_equals $temp packingType,accuracy 'grid_ieee 64' -${tools_dir}/grib_set -r -s packingType=grid_simple $temp $temp.simple -grib_check_key_equals $temp.simple packingType,accuracy 'grid_simple 32' -rm -f $temp.simple +if [ $ECCODES_ON_WINDOWS -eq 0 ]; then + input=${data_dir}/grid_ieee.grib + ${tools_dir}/grib_set -r -s packingType=grid_simple $input $temp + grib_check_key_equals $input accuracy 32 + grib_check_key_equals $temp packingType 'grid_simple' + grib_check_key_equals $temp accuracy,bitsPerValue '32 32' + stats1=`${tools_dir}/grib_get -F%.2f -p skew,kurt $input` + stats2=`${tools_dir}/grib_get -F%.2f -p skew,kurt $temp` + [ "$stats1" = "$stats2" ] + # 64bit IEEE - We can only do max. 32 with CCSDS + input=${data_dir}/reduced_gaussian_model_level.grib2 + ${tools_dir}/grib_set -r -s packingType=grid_ieee,precision=2 $input $temp + grib_check_key_equals $temp packingType,accuracy 'grid_ieee 64' + ${tools_dir}/grib_set -r -s packingType=grid_simple $temp $temp.simple + grib_check_key_equals $temp.simple packingType,accuracy 'grid_simple 32' + rm -f $temp.simple +fi # Test 'accuracy' key # -----------------------