8000 MOBT-572: Loosen dz-scaling usage restriction. by bayliffe · Pull Request #1959 · metoppv/improver · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

bayliffe
Copy link
Contributor

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:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

…ing coefficient available if no forecast period has a greater length than the forecast itself.
@gavinevans gavinevans self-assigned this Oct 17, 2023
Copy link
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 👍

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.
Copy link
Contributor

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. "

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gavinevans gavinevans assigned bayliffe and unassigned gavinevans Oct 17, 2023
@bayliffe bayliffe assigned gavinevans and unassigned bayliffe Oct 19, 2023
@codecov
Copy link
codecov bot commented Oct 19, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (1c3b584) 98.39% compared to head (7ba91ff) 98.39%.

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              
Files Coverage Δ
improver/calibration/dz_rescaling.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gavinevans gavinevans assigned brhooper and unassigned gavinevans Oct 19, 2023
@brhooper brhooper merged commit 14d78fd into metoppv:master Oct 23, 2023
@brhooper brhooper assigned bayliffe and unassigned brhooper Oct 23, 2023
@bayliffe bayliffe mentioned this pull request Nov 3, 2023
1 task
gavinevans pushed a commit that referenced this pull request Nov 3, 2023
* 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.
@gavinevans gavinevans added this to the IM2023.3 milestone Nov 8, 2023
MoseleyS pushed a commit to MoseleyS/improver that referenced this pull request Aug 22, 2024
* 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.
@bayliffe bayliffe deleted the mobt572 branch April 29, 2025 14: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
0