ECC-791 and ECC-786: Tools output

This commit is contained in:
Shahram Najm 2023-12-05 13:45:57 +00:00
parent 161a048488
commit bfabfb2e21
2 changed files with 8 additions and 2 deletions

View File

@ -40,7 +40,13 @@ ${tools_dir}/grib_ls -l 0,0,1 $infile >> $tempLog
${tools_dir}/grib_get -l 0,0,1 $infile >> $tempLog
${tools_dir}/grib_get -p count,step $infile >> $tempLog
${tools_dir}/grib_get -P count $infile >> $tempLog
${tools_dir}/grib_get -i 0 $infile
# ECC-786 and ECC-791
result=$( ${tools_dir}/grib_get -p shortName -i 0 $infile )
[ "$result" = "t 199.078 " ]
result=$( ${tools_dir}/grib_get -i 8191 $infile )
[ "$result" = "160.852 " ]
files=" reduced_gaussian_lsm.grib1
reduced_gaussian_model_level.grib1

View File

@ -1285,7 +1285,7 @@ void grib_print_key_values(grib_runtime_options* options, grib_handle* h)
snprintf(value, 32, options->format, v);
strlenvalue = (int)strlen(value);
width = strlenvalue < options->default_print_width ? options->default_print_width + 2 : strlenvalue + 2;
fprintf(dump_file, "%-*s", (int)width, value);
fprintf(dump_file, "%s%-*s", (written_to_dump?" ":""), (int)width, value);
written_to_dump = 1;
}
if (written_to_dump) {