Step-by-step guide

This can be done by using the grib_set command.

You can use the "setBitsPerValue" key as in:

% grib_set -s setBitsPerValue=17 in.grib out.grib

or use the "repack" option:

% grib_set -r -s bitsPerValue=17 in.grib out.grib


In these commands, we first decode the data values, then change the bitsPerValue key and then repack.
It is advisable to check the field values after such a change, for example by printing the statistics before and after:

% grib_ls -n statistics in.grib
% grib_ls -n statistics out.grib


Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues