improver.cli.relabel_to_period module

CLI to relabel a diagnostic as a period diagnostic.

process(cube, *, period=None)[source]

Relabel a diagnostic as a period diagnostic.

Modify an existing diagnostic to represent a period. This will either relabel an instantaneous diagnostic to be a period diagnostic, or modify a period diagnostic to have a different period. This may be useful when trying to combine instantaneous and period diagnostics.

Parameters:
  • cube (iris.cube.Cube) – The cube for a diagnostic that will be modified to represent the required period.

  • period (int) – The period in hours.

Returns:

Cube with metadata updated to represent the required period.

Return type:

iris.cube.Cube