diff --git a/tests/bufr_copy.sh b/tests/bufr_copy.sh index eb3b877fb..10a44688e 100755 --- a/tests/bufr_copy.sh +++ b/tests/bufr_copy.sh @@ -30,7 +30,7 @@ echo "Test: copy synop messages ..." rm -f $fBufrTmp echo "Test: copy synop messages " >> $fLog -${tools_dir}/bufr_copy -w dataCategory=0 $fBufrInput $fBufrTmp >> $fLog +${tools_dir}/bufr_copy -p typicalDate -w dataCategory=0 $fBufrInput $fBufrTmp >> $fLog for i in 1 2 3 ;do category=`${tools_dir}/bufr_get -w count=$i -p dataCategory:l $fBufrTmp` diff --git a/tests/gts_get.sh b/tests/gts_get.sh index 2f50f10f6..cf6b2b51d 100755 --- a/tests/gts_get.sh +++ b/tests/gts_get.sh @@ -29,7 +29,14 @@ ${tools_dir}/gts_get -p TT,AA,II,CCCC,YY,GG,gg,BBB $gts_file >/dev/null #---------------------------------------------- # Test "-w" switch #---------------------------------------------- -${tools_dir}/gts_get -p TT -w count=3 $gts_file >/dev/null +${tools_dir}/gts_get -p TT -w count=3 $gts_file + + +#---------------------------------------------- +# Test "-s" switch +#---------------------------------------------- +result=$( ${tools_dir}/gts_get -s YY=ab -p YY -w count=3 $gts_file ) +[ "$result" = "ab" ] gts_file=${data_dir}/gts.grib diff --git a/tests/metar_ls.sh b/tests/metar_ls.sh index 779619b8f..65571ca34 100755 --- a/tests/metar_ls.sh +++ b/tests/metar_ls.sh @@ -42,6 +42,11 @@ ${tools_dir}/metar_ls $f >> $fLog ${tools_dir}/metar_ls -w CCCC=VILK $f >> $fLog +#------------------------------------------- +# Test "-s" switch +#------------------------------------------- +${tools_dir}/metar_ls -s dummy=1 -w count=5 $f >> $fLog + #------------------------------------------- # Test "-p" switch #------------------------------------------- diff --git a/tools/gts_copy.cc b/tools/gts_copy.cc index 9fdf7041a..bf17f85e9 100644 --- a/tools/gts_copy.cc +++ b/tools/gts_copy.cc @@ -73,14 +73,14 @@ int grib_tool_new_file_action(grib_runtime_options* options, grib_tools_file* fi int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) { - int err = 0; - if (!options->skip) { - if (options->set_values_count != 0) - err = grib_set_values(h, options->set_values, options->set_values_count); + // int err = 0; + // if (!options->skip) { + // if (options->set_values_count != 0) + // err = grib_set_values(h, options->set_values, options->set_values_count); - if (err != GRIB_SUCCESS && options->fail) - exit(err); - } + // if (err != GRIB_SUCCESS && options->fail) + // exit(err); + // } grib_tools_write_message(options, h); return 0; diff --git a/tools/gts_dump.cc b/tools/gts_dump.cc index eff44c548..a58f93ddf 100644 --- a/tools/gts_dump.cc +++ b/tools/gts_dump.cc @@ -95,8 +95,7 @@ int grib_tool_new_file_action(grib_runtime_options* options, grib_tools_file* fi if (!options->current_infile->name) return 0; snprintf(tmp, 1024, "FILE: %s ", options->current_infile->name); - if (!grib_options_on("C")) - fprintf(stdout, "***** %s\n", tmp); + fprintf(stdout, "***** %s\n", tmp); return 0; } @@ -114,8 +113,8 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h) grib_set_flag(h, options->print_keys[i].name, GRIB_ACCESSOR_FLAG_DUMP); snprintf(tmp, 1024, "MESSAGE %d ( length=%ld )", options->handle_count, length); - if (!grib_options_on("C")) - fprintf(stdout, "#============== %-38s ==============\n", tmp); + + fprintf(stdout, "#============== %-38s ==============\n", tmp); if (!strcmp(options->dump_mode, "default")) { GRIB_CHECK_NOLINE(grib_get_string(h, "identifier", identifier, &idlen), 0); printf("%s {\n", identifier); diff --git a/tools/metar_copy.cc b/tools/metar_copy.cc index 0ea7e14d4..9e4e14ef7 100644 --- a/tools/metar_copy.cc +++ b/tools/metar_copy.cc @@ -31,7 +31,6 @@ grib_option grib_options[] = { "double (key:d) or an integer (key:i)\n\t\ttype can be defined. Default type " "is string.\n", 0, 1, 0 }, - { "B:", 0, 0, 0, 1, 0 }, { "V", 0, 0, 0, 1, 0 }, { "W:", 0, 0, 0, 1, 0 }, { "U", 0, 0, 1, 0, 0 }, diff --git a/tools/metar_ls.cc b/tools/metar_ls.cc index 98c748863..630cf62a7 100644 --- a/tools/metar_ls.cc +++ b/tools/metar_ls.cc @@ -17,24 +17,18 @@ grib_option grib_options[] = { { "F:", 0, 0, 1, 1, "%g" }, { "P:", 0, 0, 0, 1, 0 }, { "w:", 0, 0, 0, 1, 0 }, - // { "j", 0, "json output\n", 0, 1, 0 }, - { "B:", 0, 0, 0, 1, 0 }, - /* {"l:",0,0,0,1,0}, */ { "s:", 0, 0, 0, 1, 0 }, - /* {"i:",0,0,0,1,0}, */ { "n:", 0, 0, 1, 1, "ls" }, { "m", 0, 0, 0, 1, 0 }, { "V", 0, 0, 0, 1, 0 }, { "W:", 0, 0, 1, 1, "10" }, { "S", 0, 0, 1, 0, 0 }, - /* {"M",0,0,0,1,0}, */ { "H", 0, 0, 1, 0, 0 }, { "g", 0, 0, 0, 1, 0 }, { "P", 0, 0, 1, 0, 0 }, { "T:", 0, 0, 1, 0, "M" }, { "7", 0, 0, 0, 1, 0 }, { "v", 0, 0, 1, 0, 0 } - /*{"x",0,0,0,1,0}*/ }; const char* tool_description =