improver.utilities.time_lagging module

Provide support utilities for time lagging ensembles

class improver.utilities.time_lagging.GenerateTimeLaggedEnsemble(cycletime=None)[source]

Bases: object

A plugin to combine realizations from different forecast cycles into one cube.

__init__(cycletime=None)[source]

Initialise class.

Keyword Arguments:
 cycletime (str) – A string of form YYYYMMDDTHHMMZ describing the forecast_reference_time we want the resulting cube to be relative to. Default None in which case the latest forecast_reference_time from the input cubes is used.
process(cubelist)[source]

Take an input cubelist containing forecasts from different cycles and merges them into a single cube.

The steps taken are:
  1. If no cycletime is given then find the latest cycle time from the input cubes.
  2. Update the forecast periods in each input cube to be relative to the new cycletime.
  3. Checks if there are duplicate realization numbers. If a duplicate is found, renumbers all of the realizations to remove any duplicates.
  4. Merge cubes into one cube, removing any metadata that doesn’t match.