improver.cli.combine module

Contents

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, use_latest_frt=False)[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, masked_add

  • 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.

  • use_latest_frt (bool) – If True then the latest forecast_reference_time available across the input cubes will be used for the output with a suitably updated forecast_period.

Returns:

Returns a cube with the combined data.

Return type:

result (iris.cube.Cube)