improver.cli.deterministic_realization_selector module

Contents

improver.cli.deterministic_realization_selector module#

CLI to select the deterministic realization

process(*cubes, target_realization_number=0, attribute='primary_input_realizations_to_clusters')[source]#

Extract a specific realization from a forecast cube using a cluster cube’s attribute: “primary_input_realizations_to_clusters”.

Parameters:
  • cubes (inputcube) – A list of two cubes containing a forecast and a cluster cube. The cluster cube will contain the attribute: “primary_input_realizations_to_clusters”. This will be used to split the forecasts and cluster cube and determine which realizations to extract from the forecast cube.

  • target_realization_number (int) – The number of the realization of interest. Default value = 0.

  • attribute – The attribute of the cluster cube used to identify target realization, and it’s associated cluster. Default value = “primary_input_realizations_to_clusters”.

Returns:

Forecast cube containing only the target realization.

Return type:

output_cube