Tools: deprecated options

This commit is contained in:
Shahram Najm 2024-01-10 12:42:17 +00:00
parent 9f565bed85
commit 3bb3e025f8
7 changed files with 24 additions and 20 deletions

View File

@ -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`

View File

@ -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

View File

@ -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
#-------------------------------------------

View File

@ -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;

View File

@ -95,7 +95,6 @@ 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);
return 0;
}
@ -114,7 +113,7 @@ 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);
if (!strcmp(options->dump_mode, "default")) {
GRIB_CHECK_NOLINE(grib_get_string(h, "identifier", identifier, &idlen), 0);

View File

@ -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 },

View File

@ -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 =