GRIB-527: Part 1 and also remove test for deprecated grib_convert tool

This commit is contained in:
Shahram Najm 2014-04-15 10:54:21 +01:00
parent b3a74c97dc
commit f7cce7a5bc
5 changed files with 18 additions and 10 deletions

View File

@ -1,7 +1,7 @@
TESTS = definitions.sh \
ieee.sh grib1to2.sh \
unit_tests.sh \
grib2to1.sh badgrib.sh ls.sh convert.sh filter.sh \
grib2to1.sh badgrib.sh ls.sh filter.sh \
multi.sh budg.sh gridType.sh concept.sh decimalPrecision.sh \
bitsPerValue.sh get_fail.sh missing.sh \
local.sh step.sh set.sh iterator.sh \

View File

@ -8,6 +8,12 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
#
# ----------------------------------------------------------------------------------
# Note: the grib_convert tool is now deprecated! So this test is no longer relevant
# ----------------------------------------------------------------------------------
#
. ./include.sh
REDIRECT=/dev/null

View File

@ -29,6 +29,7 @@ EOF
${tools_dir}grib_filter ${data_dir}/f.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
rm -f ${data_dir}/split/*
rmdir ${data_dir}/split
rm -f ${data_dir}/f.rules
# Test with nonexistent keys. Note spelling of centre!

View File

@ -17,7 +17,7 @@ then
exit 0
fi
tmpdata=grib_api.grib
tmpdata=grib_api.$$.grib
rm -f $tmpdata || true

View File

@ -12,7 +12,8 @@
REDIRECT=/dev/null
rm -f ${data_dir}/log | true
templog=${data_dir}/log.step.$$
rm -f ${templog} | true
for i in 0 10
do
for s in 0 1200 600 6000
@ -23,7 +24,7 @@ do
${tools_dir}grib_set -s ${key}=$s ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
# echo grib_set -s ${key}=$s ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
# grib_get -p step,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib >> ${data_dir}/log
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib >> ${templog}
done
done
done
@ -35,24 +36,24 @@ do
${tools_dir}grib_set -s ${key}=$s ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
# echo grib_set -s ${key}=$s ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
# grib_ls -p step,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib >> ${data_dir}/log
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/timeRangeIndicator_${i}.grib ${data_dir}/out.grib >> ${templog}
done
rm -f ${data_dir}/out.grib | true
# test added for ifs stepType=max,min
${tools_dir}grib_set -s stepType=max,startStep=3,endStep=6 ${data_dir}/reduced_gaussian_model_level.grib1 ${data_dir}/out.grib
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/reduced_gaussian_model_level.grib1 ${data_dir}/out.grib >> ${data_dir}/log
${tools_dir}grib_get -p mars.step,stepRange,startStep,endStep,P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange:l ${data_dir}/reduced_gaussian_model_level.grib1 ${data_dir}/out.grib >> ${templog}
rm -f ${data_dir}/out.grib | true
diff ${data_dir}/log ${data_dir}/step.log
diff ${templog} ${data_dir}/step.log
(${tools_dir}grib_filter ${data_dir}/step_grib1.filter ${data_dir}/timeRangeIndicator_0.grib > ${data_dir}/log) 2>$REDIRECT
(${tools_dir}grib_filter ${data_dir}/step_grib1.filter ${data_dir}/timeRangeIndicator_0.grib > ${templog}) 2>$REDIRECT
diff ${data_dir}/log ${data_dir}/step_grib1.log
diff ${templog} ${data_dir}/step_grib1.log
rm -f ${data_dir}/log | true
rm -f ${templog} | true
# GRIB-180
# Set PDT 4.8 where you can find the EndOfOverallTimeInterval keys