Skip to content

Handle converting multiple wind cubes to point to true north#1892

Merged
daflack merged 1 commit intomainfrom
handle_multiple_wind_fields_in_fix_um_winds_callback
Feb 17, 2026
Merged

Handle converting multiple wind cubes to point to true north#1892
daflack merged 1 commit intomainfrom
handle_multiple_wind_fields_in_fix_um_winds_callback

Conversation

@jfrost-mo
Copy link
Member

@jfrost-mo jfrost-mo commented Jan 28, 2026

This avoids crashing when loading data with more than one of each wind component, such as an instantaneous and an aggregation cube. This was especially problematic as it runs in the callback stage, so it will crash even recipes that don't use the wind.

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

This avoids crashing when loading data with more than one of each wind
component, such as an instantaneous and an aggregation cube. This was
especially problematic as it runs in the callback stage, so it will
crash even recipes that don't use the wind.
@jfrost-mo jfrost-mo self-assigned this Jan 28, 2026
@jfrost-mo jfrost-mo added bug Something isn't working small Small issue that should be quick to resolve labels Jan 28, 2026
@github-actions
Copy link
Contributor

Coverage

@jfrost-mo jfrost-mo requested a review from daflack February 16, 2026 14:01
@jfrost-mo jfrost-mo added this to the CSET v26.2.0 milestone Feb 16, 2026
Copy link
Collaborator

@daflack daflack left a comment

Choose a reason for hiding this comment

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

Happy with these changes, look sensible and will only likely error if we have a different number of u and v cubes, which we would not expect so is sensible to error on that. Happy that the tests don't need to be updated, and all tests past.

@daflack daflack merged commit edf6286 into main Feb 17, 2026
8 checks passed
@daflack daflack deleted the handle_multiple_wind_fields_in_fix_um_winds_callback branch February 17, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working small Small issue that should be quick to resolve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants