Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the lightning_flash_accumulation_in_vicinity cell method missing from imengluk #2064

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Mark Baker <[email protected]> <[email protected]
Marcus Spelman <[email protected]> <[email protected]>
Mark Worsfold <[email protected]> <[email protected]>
Mark Worsfold <[email protected]> <[email protected]>
Max White <[email protected]> <[email protected]>
Meabh NicGuidhir <[email protected]> <[email protected]>
Neil Crosswaite <[email protected]> <[email protected]>
Paul Abernethy <[email protected]> <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ below:
- Marcus Spelman (Met Office, UK)
- Belinda Trotta (Bureau of Meteorology, Australia)
- Tomasz Trzeciak (Met Office, UK)
- Max White (Met Office, UK)
- Mark Worsfold (Met Office, UK)
- Bruce Wright (Met Office, UK)
- Ying Zhao (Bureau of Meteorology, Australia)
Expand Down
9 changes: 8 additions & 1 deletion improver/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import iris
import numpy as np
from iris.coords import DimCoord
from iris.coords import CellMethod, DimCoord
from iris.cube import Cube, CubeList

from improver import PostProcessingPlugin
Expand Down Expand Up @@ -161,6 +161,13 @@ def process(self, *cubes: Union[Cube, CubeList]) -> Cube:
)
cube.add_aux_coord(coord)

cell_method = CellMethod(
"Sum",
coords="time",
comments="of number_of_lightning_flashes_per_unit_area",
)
cube.add_cell_method(cell_method)

return cube


Expand Down
6 changes: 6 additions & 0 deletions improver_tests/lightning/test_LightningFromCapePrecip.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import numpy as np
import pytest
from iris.coords import CellMethod
from iris.cube import Cube, CubeList

from improver.lightning import LightningFromCapePrecip
Expand Down Expand Up @@ -111,6 +112,11 @@ def expected_cube_fixture() -> Cube:
dtype=np.int32,
)

cell_method = CellMethod(
"Sum", coords="time", comments="of number_of_lightning_flashes_per_unit_area"
)
cube.add_cell_method(cell_method)

return cube


Expand Down