improver.cli.copy_metadata module#
Script to copy metadata from template_cube to cube
- process(cube, template_cube, *, attributes=[], aux_coord=[])[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.
aux_coord (list) – List of names of auxilary coordinates to copy. If any are not present on template_cube, a KeyError will be raised. If the aux_coord is already present in the cube, it will be overwritten.
- Returns:
iris.cube.Cube