-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix to the wind vertical displacement adjustment implementation #1927
Conversation
… up 00Z for 23Z within a 1-hour leniency.
Codecov Report
@@ Coverage Diff @@
## master #1927 +/- ##
=======================================
Coverage 98.37% 98.37%
=======================================
Files 122 122
Lines 11707 11707
=======================================
Hits 11517 11517
Misses 190 190
|
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.
I've looked through the changes and they seem fine to me. The tests all seem to pass, and the changes to the unit tests seem sensible. I'm happy with this 👍
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.
The tests pass and the changes all look fine, including the change to test_apply_dz_rescaling
to target a reference time hour leniency which spans midnight.
I think there is just one docstring which needs updating.
@@ -121,7 +121,7 @@ def _create_scaling_factor_cube( | |||
Scaling factor cube. | |||
""" | |||
cubelist = iris.cube.CubeList() | |||
for ref_hour in [3, 9]: | |||
for ref_hour in [3, 12]: |
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.
I think the docstring needs updating to reflect this change
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.
Done.
…fset of 0, is used before any other reference time is selected.
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 good - thanks @bayliffe.
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.
I'm happy with these changes - all the tests work and they look sensible 👍
* upstream/master: Fix to the wind vertical displacement adjustment implementation (metoppv#1927) Add function which normalises input cubes according to a reference (metoppv#1919) Skip ECC bounds usage when converting probabilities to percentiles (metoppv#1926) Add CLIs to support rescaling of the forecast based on altitude difference (metoppv#1917) Changes to the modal code to increase the percentage to 30% and change the groupings to provide a more representative daily summary symbol. (metoppv#1925) Add plugins to support rescaling of the forecast based on altitude difference (metoppv#1916) Support conversion from percentiles to probabilities (metoppv#1924) Correct handling of reference time in weather_code plugin (metoppv#1920) Add CLI for clipping cubes (metoppv#1918) Update cbh ecc name (metoppv#1922) Updates Broadcast and expand_bounds in Combine Plugin (metoppv#1914) Mobt515 cloud base height spot extraction (metoppv#1911) MOBT-494: Cube title setting in weather symbol code (metoppv#1912) MOBT512-masking percentiles for cloud base height (metoppv#1908) Mobt 496 enforce forecast between references (metoppv#1907)
…ppv#1927) * Ensure that the forecast reference time goes around the clock to pick up 00Z for 23Z within a 1-hour leniency. * Modify unit tests to require seeking for a match across the midnight divide. * Black formatting change. * Update test doc-string * Add an extra test to demonstrate that the exact reference time, an offset of 0, is used before any other reference time is selected.
This change addresses an issue in the dz adjustment of wind speeds. The leniency applied for finding a dz adjustment match in the ancillary did not span across midnight, meaning a 23Z forecast reference time was unable to use a 00Z forecast reference time with a leniency of +- 1 hour. This change simply adds a modulus about 24 hours to ensure the looping around to 00Z occurs as required.
The unit tests have been modified to span the midnight line to check that this works as expected.
Testing: