cleanfile

../../_images/CLEANFILE.png

Removes padding or unwanted data transmission headers from the beginning of binary data files so that Metview can properly recognise them as a GRIB or BUFR file.

Note

This function performs the same task as the Clean File icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

cleanfile(**kwargs)

Removes padding or unwanted data transmission headers from the beginning of binary data files so that Metview can properly recognise them as a GRIB or BUFR file.

Parameters
  • path (str) – Specifies the path to the input data.

  • data (Binary) – Specifies the input as an object. If both data and path are specified data takes precedence.

  • skip_hirlam_custom_record ({"no", "yes"}, default: "no") – Skips custom records for HIRLAM data.

Return type

Fieldset or Bufr