-
Notifications
You must be signed in to change notification settings - Fork 89
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
Modifies LightningFromCapePrecip plugin to accept 3h precipitation-rate-max data #1568
Modifies LightningFromCapePrecip plugin to accept 3h precipitation-rate-max data #1568
Conversation
…te-max data - We need this so we can generate data for days 6-8 when only 3h data are available.
Codecov Report
@@ Coverage Diff @@
## master #1568 +/- ##
=======================================
Coverage 97.96% 97.96%
=======================================
Files 107 107
Lines 9567 9567
=======================================
Hits 9372 9372
Misses 195 195
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MoseleyS 👍
I've added a few minor comments.
@@ -74,7 +74,8 @@ def _get_inputs(cubes: CubeList) -> Tuple[Cube, Cube]: | |||
""" | |||
Separates CAPE and precipitation rate cubes and checks that the following | |||
match: forecast_reference_time, spatial coords, time-bound interval and | |||
that CAPE time is exactly one hour older than precipitation rate time. | |||
that CAPE time is at the lower bound of precipitation rate time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a note, and unrelated to this PR, the acceptance tests for the lightning_from_cape_and_precip.py
CLI are currently failing due a mismatch in the units for the number_of_lightning_flashes_per_unit_area
coordinate i.e. m-2
vs s-1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Final tweak from #1550 hadn't been committed and merged - it has now.
- Improves tests and doc-strings
@@ -142,6 +143,7 @@ def test_3d_cubes(cape_cube, precip_cube, expected_cube): | |||
assert np.allclose(result.data, expected_cube.data) | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black is currently failing and it's probably because of this blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine, and all the tests pass. I've nothing to add.
* bayliffe/mobt77: Review changes. Acceptance test added. Add type-hinting throughout. Formatting. Adding unit tests. Grouping solution and rename. First draft of a modal symbol plugin. Modifies LightningFromCapePrecip plugin to accept 3h precipitation-rate-max data (metoppv#1568) Moves position of land-sea-mask in threshold CLI (metoppv#1565) Re-label a diagnostic as a period diagnostic (metoppv#1561) Adds LatitudeThreshold plugin and lightning-filter CLI (metoppv#1550) Adds land-mask option to threshold CLI (metoppv#1559) Move statsmodels in environment yml files (metoppv#1556) rearranged args (metoppv#1558) Update Code-Style-Guide.rst (metoppv#1554) Updating timezone cli call (metoppv#1551)
…te-max data (metoppv#1568) * Modifies LightningFromCapePrecip plugin to accept 3h precipitation-rate-max data - We need this so we can generate data for days 6-8 when only 3h data are available. * First review - Improves tests and doc-strings * Black
Addresses #1518
We need this so we can generate data for days 6-8 when only 3h data are available.
Testing: