You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

grib_filter/bufr_filter: How do I control the format of array printing?

Step-by-step guide

One can add several 'modifiers' to a key in square brackets to control number of columns, separator string and format:

[key!c%F'S']
c -> number of columns
F -> C-style formatting
S -> separator string
  1. Examples:

    [latitude!11] -> print array using 11 columns
    [latitude','] -> print array with entries separated by a comma
    [latitude%.5f] -> print real numbers with 5 decimal places
  2. Note: to print all the values on one line, set the number of columns to 0 (zero).



  • No labels