Skip to content

[mobt-1285] - Add gridded distance to feature ancil generation for ml precip project - #2452

Open
jdjonathandavies wants to merge 9 commits into
metoppv:masterfrom
jdjonathandavies:feature_gridded_distance_to_ancil_2
Open

jdjonathandavies wants to merge 9 commits into
metoppv:masterfrom
jdjonathandavies:feature_gridded_distance_to_ancil_2

Conversation

@jdjonathandavies

@jdjonathandavies jdjonathandavies commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Related issues: mobt-1285

As an IMPROVER scientist I would like to be able to supply the [ML Precipitation project] (https://github.com/MetOffice/ml_improver_calibration) with an additional distance to ocean / coast ancillary for gridded data. The data scientists working on this project have been supplied with a land mask ancillary and precipitation data on gridded cubes, and want to use distance to ocean / coast as an additional feature for their ML model.

The current ancillary generation code handles spot cubes for distance to feature, so it will require some modification to be able to produce the same for gridded data.

There is an accompanying PR in improver_aux that runs the ancillary generation code.

Acceptance criteria

  • gridded distance to coast ancillary provided to the ml precip project
  • update the ancillary generation code in improver and improver_aux to be able to produce gridded as well as spot data
  • update tests to include gridded data

Solution

  • I've extended the DistanceToFeature plugin to be able to work on gridded cubes
  • Refactored the associated tests, moving some of the testing sites into dedicated fixtures
  • Added equivalent grid fixtures that are also tested
  • I've explicitly skipped updating some tests where there isn't an obvious equivalent gridded cube for the test (there are a few tests that work on sites that wouldn't map onto a n x m grid)

Testing

  • Ran unit and acceptance tests

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