mirror of https://github.com/ecmwf/eccodes.git
ECC-791 and ECC-786: Tools output
This commit is contained in:
parent
161a048488
commit
bfabfb2e21
|
@ -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 -l 0,0,1 $infile >> $tempLog
|
||||||
${tools_dir}/grib_get -p count,step $infile >> $tempLog
|
${tools_dir}/grib_get -p count,step $infile >> $tempLog
|
||||||
${tools_dir}/grib_get -P count $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
|
files=" reduced_gaussian_lsm.grib1
|
||||||
reduced_gaussian_model_level.grib1
|
reduced_gaussian_model_level.grib1
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ void grib_print_key_values(grib_runtime_options* options, grib_handle* h)
|
||||||
snprintf(value, 32, options->format, v);
|
snprintf(value, 32, options->format, v);
|
||||||
strlenvalue = (int)strlen(value);
|
strlenvalue = (int)strlen(value);
|
||||||
width = strlenvalue < options->default_print_width ? options->default_print_width + 2 : strlenvalue + 2;
|
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;
|
written_to_dump = 1;
|
||||||
}
|
}
|
||||||
if (written_to_dump) {
|
if (written_to_dump) {
|
||||||
|
|
Loading…
Reference in New Issue