mirror of https://github.com/ecmwf/eccodes.git
GRIB-757: tigge_check -w test
This commit is contained in:
parent
42e80ef11f
commit
61b216683b
|
@ -12,27 +12,24 @@
|
||||||
|
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#set -eax
|
|
||||||
|
|
||||||
dir="${data_dir}/tigge/"
|
dir="${data_dir}/tigge/"
|
||||||
|
|
||||||
# check tigge global
|
# check tigge global
|
||||||
for file in ${dir}/tigge_*.grib
|
for file in ${dir}tigge_*.grib
|
||||||
do
|
do
|
||||||
${tigge_dir}tigge_check ${file} 2> $REDIRECT > $REDIRECT
|
${tigge_dir}tigge_check ${file} 2> $REDIRECT > $REDIRECT
|
||||||
done
|
done
|
||||||
|
|
||||||
# check tigge-lam
|
# check tigge-lam
|
||||||
for file in ${dir}/tiggelam_*.grib
|
for file in ${dir}tiggelam_*.grib
|
||||||
do
|
do
|
||||||
${tigge_dir}tigge_check -l ${file} 2> $REDIRECT > $REDIRECT
|
${tigge_dir}tigge_check -l ${file} 2> $REDIRECT > $REDIRECT
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# Now test non-TIGGE files too. We now expect tigge_check to fail!
|
# Test non-TIGGE files too. We now expect tigge_check to fail!
|
||||||
# All the grib files in the samples are non-TIGGE
|
# All the GRIB files in the samples are non-TIGGE
|
||||||
for file in ${ECCODES_SAMPLES_PATH}/*.tmpl
|
for file in ${ECCODES_SAMPLES_PATH}/regular_*.tmpl; do
|
||||||
do
|
|
||||||
set +e
|
set +e
|
||||||
${tigge_dir}tigge_check ${file} 2> $REDIRECT > $REDIRECT
|
${tigge_dir}tigge_check ${file} 2> $REDIRECT > $REDIRECT
|
||||||
status=$?
|
status=$?
|
||||||
|
@ -55,3 +52,24 @@ ${tools_dir}grib_set -s productionStatusOfProcessedData=5 $input $TEMP
|
||||||
${tools_dir}grib_compare -bproductionStatusOfProcessedData $input $TEMP
|
${tools_dir}grib_compare -bproductionStatusOfProcessedData $input $TEMP
|
||||||
|
|
||||||
rm -f $TEMP
|
rm -f $TEMP
|
||||||
|
|
||||||
|
# GRIB-757 validity date/time check fails for the following:
|
||||||
|
tigge_bad_validity="
|
||||||
|
tigge_kwbc_sfc_sf.grib
|
||||||
|
tigge_kwbc_sfc_slhf.grib
|
||||||
|
tigge_kwbc_sfc_sshf.grib
|
||||||
|
tigge_kwbc_sfc_ssr.grib
|
||||||
|
tigge_kwbc_sfc_str.grib
|
||||||
|
tigge_kwbc_sfc_ttr.grib
|
||||||
|
"
|
||||||
|
for file in $tigge_bad_validity; do
|
||||||
|
set +e
|
||||||
|
${tigge_dir}tigge_check -w ${dir}${file} > $TEMP
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -eq 1 ]
|
||||||
|
cat $TEMP
|
||||||
|
grep -q "invalid validity Date/Time" $TEMP
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -f $TEMP
|
||||||
|
|
Loading…
Reference in New Issue