-
Notifications
You must be signed in to change notification settings - Fork 93
MOBT-572: Loosen dz-scaling usage restriction. #1959
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
Conversation
…ing coefficient available if no forecast period has a greater length than the forecast itself.
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 @bayliffe 👍
I've added a few minor comments about docstrings.
@@ -179,7 +179,7 @@ def test_apply_dz_rescaling( | |||
cube to ensure the plugin always snaps to the next largest forecast_time when the | |||
precise point is not available. | |||
frt_hour_offset (hours) alters the forecast reference time hour within the forecast | |||
whilst the forececast reference time hour of the scaling factor remains the same. | |||
whilst the forecast reference time hour of the scaling factor remains the same. |
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.
It might be best to extend the sentence above i.e. "forecast_period_offset (hours) adjusts the forecast period coord on the forecast cube to ensure the plugin always snaps to the next largest forecast_time when the precise point is not available" to add e.g. "except when the forecast period of the forecast exceeds all forecast periods within the scaling factor cube. In this case, the last forecast period within the scaling factor cube will be used. "
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.
improver_tests/calibration/dz_rescaling/test_apply_dz_rescaling.py
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1959 +/- ##
==========================================
- Coverage 98.39% 98.39% -0.01%
==========================================
Files 123 123
Lines 11831 11829 -2
==========================================
- Hits 11641 11639 -2
Misses 190 190
☔ View full report in Codecov by Sentry. |
* Loosen dz scaling application to use the longest forecast period scaling coefficient available if no forecast period has a greater length than the forecast itself. * Adjustments to doc-strings as per review.
Loosen dz scaling application to use the longest forecast period scaling coefficient available if no scaling coefficient has a forecast period that is longer than the forecast itself.
This will enable us to e.g. use a T+7 day scaling coefficient when calibrating a T+8 days forecast.
It also means we have no warning that such use if going on. So for example, once we implement 14-day forecasts if we fail to update this ancillary with a greater range of forecast periods it will silently use the longest available.
Testing: