improver.cli.combine module

Script to combine netcdf data.

process(*cubes, operation='+', new_name=None, broadcast=None, minimum_realizations=None, cell_method_coordinate=None, expand_bound=True)[source]

Combine input cubes.

Combine the input cubes into a single cube using the requested operation. The first cube in the input list provides the template for output metadata. If coordinates are expanded as a result of this combine operation (e.g. expanding time for accumulations / max in period) the upper bound of the new coordinate will also be used as the point for the new coordinate.

Parameters:
  • cubes (iris.cube.CubeList or list of iris.cube.Cube) – An iris CubeList to be combined.

  • operation (str) – An operation to use in combining input cubes. One of: +, -, *, add, subtract, multiply, min, max, mean

  • new_name (str) – New name for the resulting dataset.

  • broadcast (str) – If specified, the input cubes will be broadcast over the coordinate name provided. If “threshold” is provided the plugin will try to find a threshold coordinate on the probability cube.

  • minimum_realizations (int) – If specified, the input cubes will be filtered to ensure that only realizations that include all available lead times are combined. If the number of realizations that meet this criteria are fewer than this integer, an error will be raised.

  • cell_method_coordinate (str) – If specified, a cell method is added to the output with the coordinate provided. This is only available for max, min and mean operations.

  • expand_bound (bool) – If True then coord bounds will be extended to represent all cubes being combined.

Returns:

Returns a cube with the combined data.

Return type:

result (iris.cube.Cube)