Testing: add tests for grib1 2nd order pack/unpack
@@ -93,12 +93,29 @@ nums=`${tools_dir}/grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMi
res=`${tools_dir}/grib_get -l 33,88.5 $sec_ord_bmp`
[ "$res" = "9999 5.51552 9999 9999 " ]
-res=`${tools_dir}//grib_get -l 28.5,90 $sec_ord_bmp`
+res=`${tools_dir}/grib_get -l 28.5,90 $sec_ord_bmp`
[ "$res" = "3.51552 9999 5.26552 9999 " ]
# GRIB-203 nearest on M-F second order boustrophedonic
res=`${tools_dir}/grib_get -w count=1 -l 0,0 lfpw.grib1`
[ "$res" = "20560.7 20563.4 20554.7 20559.5 " ]
-rm -f $sec_ord_bmp
+# Unpack/pack test for second order grib1 data
+# --------------------------------------------
+g1files="lfpw.grib1
+ gen_ext_spd_2.grib
+ gen_ext_spd_3.grib"
+temp_grib1=temp.second_order.grib
+temp_stat1=temp.second_order.stat1
+temp_stat2=temp.second_order.stat2
+
+for f1 in $g1files; do
+ # This does unpack and repack
+ ${tools_dir}/grib_copy -r $f1 $temp_grib1
+ ${tools_dir}/grib_get -n statistics $f1 > $temp_stat1
+ ${tools_dir}/grib_get -n statistics $temp_grib1 > $temp_stat2
+ perl ${test_dir}/number_compare.pl $temp_stat1 $temp_stat2
+done
+
+rm -f $temp_grib1 $sec_ord_bmp
rm -f test.filter
