Added test for nchunk=-1

Added the third test for nchunk=-1. OUTPUT_FILENAME_FORMAT changed to 3 digits, which led to file name changes in this script.
This commit is contained in:
wqu-bom 2019-08-09 11:48:16 +10:00 committed by GitHub
parent fea41048bd
commit 1f8abaa7fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -25,9 +25,9 @@ cp ${data_dir}/mixed.grib ./
input=mixed.grib input=mixed.grib
${tools_dir}/codes_split_file 3 $input ${tools_dir}/codes_split_file 3 $input
# There should now be 3 new files. Make sure they are valid # There should now be 3 new files. Make sure they are valid
${tools_dir}/grib_ls mixed.grib_01 ${tools_dir}/grib_ls mixed.grib_001
${tools_dir}/grib_ls mixed.grib_02 ${tools_dir}/grib_ls mixed.grib_002
${tools_dir}/grib_ls mixed.grib_03 ${tools_dir}/grib_ls mixed.grib_003
total=`${tools_dir}/codes_count mixed.grib_*` total=`${tools_dir}/codes_count mixed.grib_*`
[ $total -eq 14 ] [ $total -eq 14 ]
@ -44,7 +44,19 @@ ${tools_dir}/codes_split_file 10 $input
total=`${tools_dir}/codes_count tigge_ecmwf.grib2_[0-9]*` total=`${tools_dir}/codes_count tigge_ecmwf.grib2_[0-9]*`
[ $total -eq 248 ] [ $total -eq 248 ]
cat tigge_ecmwf.grib2_0[1-9] tigge_ecmwf.grib2_10 > $temp cat tigge_ecmwf.grib2_[0-9][0-9][0-9] > $temp
${tools_dir}/grib_compare $input $temp
# Test 3: nchunk=-1 File with 248 messages
# -----------------------------
cp ${data_dir}/tigge_ecmwf.grib2 ./
input=tigge_ecmwf.grib2
${tools_dir}/codes_split_file -1 $input
total=`${tools_dir}/codes_count tigge_ecmwf.grib2_[0-9]*`
[ $total -eq 248 ]
cat tigge_ecmwf.grib2_[0-9][0-9][0-9] > $temp
${tools_dir}/grib_compare $input $temp ${tools_dir}/grib_compare $input $temp