Skip to content

Lighting in vicinity cell_method alignment for operations#2297

Merged
bayliffe merged 3 commits intometoppv:1.17.xfrom
bayliffe:mobt1061
Feb 19, 2026
Merged

Lighting in vicinity cell_method alignment for operations#2297
bayliffe merged 3 commits intometoppv:1.17.xfrom
bayliffe:mobt1061

Conversation

@bayliffe
Copy link
Copy Markdown
Contributor

@bayliffe bayliffe commented Feb 6, 2026

In the global data lightning diagnostic that is created within improver we manually create the cell method.
The method is stated as "Sum" with a capital s, which doesn't match the lower case "sum" in the UK model diagnostics with which is blended. When the cubes are combined before merging the data the cell_methods are checked in the MergeCubes plugin and they all get thrown away.

This PR:

  • sets the manually created cell_method to use lowercase "sum" to match the other diagnostics.

Testing:

  • Ran tests and they passed OK

Testing in the suites

Metadata in model suites

The tables below demonstrate that the metadata is now consistent across the various model suites by the time we get to the latestlevel2 feeding steps (blendcycles). The 3-hour diagnostic differs at the combine step as it feeds again from the standardise step before then having the cell method modified to the expected once again.

lightning1h (T+12 as an example)

Model Step Cell method
imukvx fetchlevel1 (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)
imukvx standardise (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)
imenukx fetchlevel1 (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)
imenukx standardise (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)

lightningvic1h (T+12 as an example)

Model Step Cell method
imukvx threshold (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx threshold (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk lightning_filter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk regrid (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk vicinity (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk realization_collapse (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)

lightningvic3h (T+12 as an example)

Model Step Cell method
imukvx combine (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)
imukvx threshold (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imukvx blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx threshold (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx combine (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=()),)
imenukx nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imenukx blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk combine (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk regrid (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk vicinity (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk realization_collapse (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk nbhood (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk recfilter (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
imengluk blendcycles (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)

Metadata in blending suite

lightningvic1h (T+12 as an example)

Model Step Cell method
immix latestblend (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
immix spot_extract (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)

lightningvic3h (T+12 as an example)

Model Step Cell method
immix latestblend (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
immix spot_extract (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)

lightningvic3h (T+122 as an example beyond the UK model contributions)

Model Step Cell method
immix latestblend (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)
immix spot_extract (CellMethod(method='sum', coord_names=('time',), intervals=(), comments=('of number_of_lightning_flashes_per_unit_area',)),)

@bayliffe
Copy link
Copy Markdown
Contributor Author

bayliffe commented Feb 9, 2026

Note these test failures are also present in a null change PR pointing at 1.17.x and appear to be unrelated to this work.

Copy link
Copy Markdown
Contributor

@gavinevans gavinevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bayliffe 👍

These changes look fine to me.

Copy link
Copy Markdown
Member

@MoseleyS MoseleyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests run locally - all fine.

@bayliffe bayliffe merged commit cce5b96 into metoppv:1.17.x Feb 19, 2026
3 of 6 checks passed
@bayliffe bayliffe deleted the mobt1061 branch February 19, 2026 09:47
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.

3 participants