gordias.util.cube_diffs.find_cube_differences#

gordias.util.cube_diffs.find_cube_differences(cube_list: CubeList, oper: str = 'VGC', return_type: str = 'logging', cube_labels: list[str] | str | None = None) dict[Any, Any] | DataFrame | None#

Expose most differences between iris cubes in a list.

This includes differences between variables, global attributes and coordinates.

return_type specifies how to present the differences, allowed values are:

  • ‘dict’: A dict is returned, with differing attributes as keys.

  • ‘DataFrame’: A pandas.DataFrame is returned.

  • ‘logging’: A logged message,

Parameters:
  • cube_list (iris.cube.CubeList) – A list of cubes.

  • oper (str) – A string that specifies which cube components to check, any combination of the following letters: ‘V’ (variables), ‘G’ (global attributes), ‘C’ (coordinates).

  • return_type (str) – A string that specifies how to present the differences. Default is ‘logging’.

  • cube_labels (list[str] | str) – A list of strings with labels for the cubes. If a string is given it will be a global label for all cubes.

Return type:

dict[str, str] | pandas.DataFrame | None