...
Step-by-step guide
Let's say you do not don't care about the GRIB data values (and its bitmap) and only want to keep the meta-data, for example when preparing a sample file (Also see Can I use my own GRIB/BUFR sample files - ecCodes GRIB and BUFR FAQ)
...