Problem

Failure setting key changeDecimalPrecision

Solution

If you issue the command "grib_set -s changeDecimalPrecision=1 spectral.grib output", you can get an error

ECCODES ERROR   :  COMPLEX_PACKING : Cannot compute binary_scale_factor

This is because that key does not work for spectral_complex! So first check the packingType key.