Skip to content

Conversation

@gavinevans
Copy link
Contributor

@gavinevans gavinevans commented Dec 18, 2025

Addresses https://github.com/metoppv/mo-blue-team/issues/763
improver_test_data PR: metoppv/improver_test_data#118

Description
This PR adds two pieces of functionality:

  • Extends the existing temporal interpolation to support specifying "google_film" as an option.
  • Adds a ForecastPeriodGapFiller plugin and CLI for filling gaps in forecast period, or smoothing across transitions between different forecast sources. This is a slightly different set-up to the existing temporal interpolation plugin and CLI, which is expecting a start and end cube only.

File breakdown:

  • envs/environment_a.yml - Add Tensorflow and Tensorflow_hub to environment to be able to use Google Film.
  • envs/latest.yml - Add Tensorflow and Tensorflow_hub to environment to be able to use Google Film.
  • improver/cli/forecast_period_gap_filler.py - A CLI for the ForecastPeriodGapFiller plugin. This is a sister CLI to the temporal-interpolate CLI but is intended to take a range collection of forecast periods and fill gaps, or smooth across transitions between forecast sources.
  • improver/cli/temporal_interpolate.py - Modifications to add "google_film" as an option.
  • improver/utilities/temporal_interpolation.py - Modifications to the existing TemporalInterpolation plugin and addition of the ForecastPeriodGapFiller and GoogleFilmInterpolation plugin. The GoogleFilmInterpolation plugin is accessed through either the TemporalInterpolation or ForecastPeriodGapFiller plugins.
  • improver_tests/acceptance/SHA256SUMS - Checksum updates.
  • improver_tests/acceptance/test_forecast_period_gap_filler.py - Acceptance tests for new CLI. This uses linear interpolation. The Google Film interpolation is more time-consuming.
  • improver_tests/acceptance/test_temporal_interpolate.py - Add an example acceptance test that uses Google Film. This takes a bit longer than most other acceptance tests and relies upon accessing the Google FILM url.
  • improver_tests/utilities/test_ForecastPeriodGapFiller.py - Unit tests for ForecastPeriodGapFiller plugin.
  • improver_tests/utilities/test_GoogleFilmInterpolation.py - Unit tests for GoogleFilmInterpolation plugin.
  • improver_tests/utilities/test_TemporalInterpolation.py - Unit tests for TemporalInterpolation plugin.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

…pecific plugin and addition of a Google Film option to the temporal interpolation plugin and CLI.
…he situation where a range of forecast periods are available, but within this range there are gaps to be filled. This class also checks an attribute, which contains information about the forecast source at each forecast period. Forecast periods at which there is a transition from one forecast source to another will be the target for the interpolation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant