diff --git a/definitions/grib2/template.3.healpix.def b/definitions/grib2/template.3.healpix.def index bd59c3246..bf0429a5b 100644 --- a/definitions/grib2/template.3.healpix.def +++ b/definitions/grib2/template.3.healpix.def @@ -27,7 +27,7 @@ concept orderingConvention(unknown) { "ring" = { ordering = 0; } "nested" = { ordering = 1; } } : dump; -alias geography.pointsOrdering = orderingConvention; +alias geography.orderingConvention = orderingConvention; flags[1] scanningMode 'grib2/tables/[tablesVersion]/3.13.table'; flagbit iScansNegatively(scanningMode,7) : dump; # WMO bit 1 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 55bf2adee..2a211f511 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -169,6 +169,7 @@ if( HAVE_BUILD_TOOLS ) # and/or take much longer list(APPEND tests_extra grib_data_quality_checks + grib_units_bias_factor grib_set_large_message_fail grib_g1monthlydate grib_g1fcperiod diff --git a/tests/grib_grid_healpix.sh b/tests/grib_grid_healpix.sh index 9b3560693..59652e57b 100755 --- a/tests/grib_grid_healpix.sh +++ b/tests/grib_grid_healpix.sh @@ -42,7 +42,8 @@ if [ $latest -gt 31 ]; then fi ${tools_dir}/grib_dump -O -p section_3 $tempGrib -${tools_dir}/grib_ls -jn geography $tempGrib +${tools_dir}/grib_ls -jn geography $tempGrib > $tempLog +grep -q "orderingConvention.*ring" $tempLog # Geoiterator # ------------- diff --git a/tests/grib_units_bias_factor.sh b/tests/grib_units_bias_factor.sh new file mode 100755 index 000000000..e10662d7a --- /dev/null +++ b/tests/grib_units_bias_factor.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# (C) Copyright 2005- 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. +# + +. ./include.ctest.sh + +label="grib_units_bias_factor_test" +outfile=temp.$label.grib + +infile=${data_dir}/sample.grib2 +max=`${tools_dir}/grib_get -F%.3f -p max $infile` +[ "$max" = "311.099" ] + +${tools_dir}/grib_set -rs unitsFactor=1.1,unitsBias=4 $infile $outfile +max=`${tools_dir}/grib_get -F%.3f -p max $outfile` +[ "$max" = "346.209" ] + +${tools_dir}/grib_set -rs unitsFactor=2 $infile $outfile +max=`${tools_dir}/grib_get -F%.3f -p max $outfile` +[ "$max" = "622.197" ] + +${tools_dir}/grib_set -rs unitsBias=4 $infile $outfile +max=`${tools_dir}/grib_get -F%.3f -p max $outfile` +[ "$max" = "315.099" ] + + +# Clean up +rm -f $outfile