Hi Dan
This is quite a multi-faceted issue. If I understand you correctly, your main problem is the missing metadata for some fields. This is likely due to some fields in the GFS output not having translations to CF metadata that iris can use. If you can find out what fields these are we can probably get them added via the metarelate project. It looks like what you are trying to do with the callback is exactly this, add some metadata to work out what the 'unknown' fields actually are. However, there are a couple of problems with the code you posted, I think to do with confusion between GRIB editions 1 and 2.
Firstly, you are using iris.FUTURE.strict_grib_load=True which is a good thing, but it does mean that the object provided as the second argument to your callback is not a GribWrapper object anymore, which in turn means you can't directly access GRIB keys as attributes. Instead you need to know which section each coded key you want is in and access it via the relevant index of the sections dictionary. For example, to get the edition number, which is stored in the key 'editionNumber' in section 0:
edition = grib_wrapper.sections[0]['editionNumber']
Secondly, I think you have the incorrect key name for table version, did you want 'tablesVersion' (also in section 0)? Thirdly, with GRIB 2 I don't think there is directly an 'indicatorOfParameter' key, instead there are a set of 3 keys to determine a parameter: 'discipline', 'parameterCategory', 'parameterNumber'. Taking all this into account you could re-write your callback as
def callback(cube, grib_message, filename):
cube.attributes.update({
'tablesVersion': grib_message.sections[1]['tablesVersion'],
'editionNumber': grib_message.sections[0]['editionNumber'],
'discipline': grib_message.sections[0]['discipline'],
'parameterCategory': grib_message.sections[4]['parameterCategory'],
'parameterNumber': grib_message.sections[4]['parameterNumber']})
This should put the required extra attributes on the cube produced with the load call. You can then write back with this information and we'll see what we can do about fixing the missing translations.
Hope that helps.
Andrew