mirror of https://github.com/ecmwf/eccodes.git
Testing: Padded count in filter
This commit is contained in:
parent
28f3e6945f
commit
3c209f7792
|
@ -280,6 +280,26 @@ set -e
|
|||
grep -q "ECCODES ERROR.*Number is too large" $tempOut
|
||||
|
||||
|
||||
echo "Padded count for filenames"
|
||||
# -----------------------------------------
|
||||
input=${data_dir}/tigge_af_ecmwf.grib2
|
||||
tempDir=temp.${label}.dir
|
||||
rm -fr $tempDir
|
||||
mkdir -p $tempDir
|
||||
cd $tempDir
|
||||
cat >$tempFilt <<EOF
|
||||
meta count_padded sprintf("%.2d", count);
|
||||
write "out__[count_padded].grib";
|
||||
EOF
|
||||
${tools_dir}/grib_filter $tempFilt $input
|
||||
[ -f out__01.grib ]
|
||||
[ -f out__02.grib ]
|
||||
[ -f out__39.grib ]
|
||||
[ -f out__40.grib ]
|
||||
cd ..
|
||||
rm -rf $tempDir
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempGrib $tempFilt $tempOut $tempRef
|
||||
rm -f ${data_dir}/formatint.rules ${data_dir}/binop.rules
|
||||
|
|
Loading…
Reference in New Issue