Add more tests for grib_index_build

This commit is contained in:
Shahram Najm 2015-11-27 18:00:29 +00:00
parent a910e208eb
commit 78cc6f4cc6
1 changed files with 9 additions and 2 deletions

View File

@ -29,10 +29,17 @@ diff index.out ${data_dir}/index.ok
rm -f index.out out.gribidx
# test grib_index_build
#
#-------------------------------
# Test grib_index_build
#-------------------------------
tempIndex=temp.$$.ix
${tools_dir}grib_index_build -o $tempIndex ${infile} >/dev/null
${tools_dir}grib_dump -D ${tempIndex} > /dev/null
${tools_dir}grib_index_build -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
grep -q "mars.levtype = { sfc, pl, pv, pt }"
${tools_dir}grib_index_build -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
rm -f $tempIndex