...
These functions return information from the given fieldset's GRIB header. Available keys (to be passed as the second parameter) can be inspected by Examining the GRIB file (right-click, Examine). Alternatively, use the GRIB API ecCodes command grib_dump to see the available key names. See https://software.ecmwf.int/wiki/display/GRIB/Grib+API+keys for more details on key names.
...
Specified with only the fieldset as its single argument, sort()
sorts in ascending order the fieldset according to the following MARS keys: date, time, step, number (ensemle ensemble member), levelist and param (integer ID).
...