improver.cli.temporal_interpolate module

Script to interpolate data between validity times

process(start_cube, end_cube, *, interval_in_mins=None, times=None, interpolation_method='linear')[source]

Interpolate data between validity times.

Interpolate data to intermediate times between the validity times of two cubes. This can be used to fill in missing data (e.g. for radar fields) or to ensure data is available at the required intervals when model data is not available at these times.

Parameters:
  • start_cube (iris.cube.Cube) – Cube containing the data at the beginning.

  • end_cube (iris.cube.Cube) – Cube containing the data at the end.

  • interval_in_mins (int) – Specifies the interval in minutes at which to interpolate between the two input cubes. A number of minutes which does not divide up the interval equally will raise an exception. If intervals_in_mins is set then times can not be used.

  • times (str) – Specifies the times in the format {YYYYMMDD}T{HHMM}Z at which to interpolate between the two input cubes. Where {YYYYMMDD} is year, month, day and {HHMM} is hour and minutes e.g 20180116T0100Z. More than one time can be provided separated by a comma. If times are set, interval_in_mins can not be used.

  • interpolation_method (str) – [“linear”, “solar”, “daynight”] Specifies the interpolation method; solar interpolates using the solar elevation, daynight uses linear interpolation but sets night time points to 0.0 linear is linear interpolation.

Returns:

A list of cubes interpolated to the desired times. The interpolated cubes will always be in chronological order of earliest to latest regardless of the order of the input.

Return type:

iris.cube.CubeList