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

MOBT-680: Update cycle time related coords when enforcing cube consistency #2096

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bayliffe
Copy link
Contributor

This code allows us to optionally adopt a more recent forecast_reference_time or blend_time when enforcing consistency on a forecast cube. The most recent of those available on the cubes involved in the consistency check is used.

This is useful for our wind gust use case where the wind speed may be from a newer cycle and the wind gust from an older cycle. We want to ensure that when we resend the wind gust after the reapplication of consistency with a newer wind speed input we update the forecast reference time and / or blend time.

Testing:

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

… in the wind gust chain when the update is prompted by a wind speed update and consistency is enforced on older data.
…the reference cube being used to update the same on the enforced cube.
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.41%. Comparing base (84a8944) to head (0384c5e).
Report is 73 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2096      +/-   ##
==========================================
+ Coverage   98.39%   98.41%   +0.02%     
==========================================
  Files         124      135      +11     
  Lines       12212    13324    +1112     
==========================================
+ Hits        12016    13113    +1097     
- Misses        196      211      +15     

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

@gavinevans gavinevans self-assigned this Feb 18, 2025
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 think that this is fine. I've added some very minor comments and a query regarding what the default behaviour should actually be.

@@ -17,6 +17,7 @@ def process(
multiplicative_amount: cli.comma_separated_list_of_float = [1.0],
comparison_operator: cli.comma_separated_list = [">="],
diff_for_warning: float = None,
use_latest_update_time: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering:

  1. should this actually be an option for the CLI, or should this just be the default behaviour?
  2. should this be True by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't like to assume that someone wants this. Making it optional means that we have not changed other processes that use this, e.g. precipitation phases enforced against precipitation.

I don't have a strong view against such a change. Would it be your preference that this defaults to True in the plugin? Would you not even expose the option within the CLI? My default is to leave as is, but if you think otherwise I'll change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm happy to leave it as it is. I just wanted to be sure that this had been considered.

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.

2 participants