improver.cli.copy_attributes module

Script to copy attributes from template_cube to cube

process(cube, template_cube, *, attributes)[source]

Copy attribute values from template_cube to cube, overwriting any existing values.

Parameters:
  • cube (iris.cube.Cube) – Source cube to be updated.

  • template_cube (iris.cube.Cube) – Source cube to get attribute values from.

  • attributes (list) – List of names of attributes to copy. If any are not present on template_cube, a KeyError will be raised.

Returns:

iris.cube.Cube