Skip to content

Add compute_wind_speed_if_missing to XarrayDataLoader - #256

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_962295307
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_962295307

Conversation

@copybara-service

Copy link
Copy Markdown

Add compute_wind_speed_if_missing to XarrayDataLoader

@google-cla

google-cla Bot commented Aug 16, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

variables is typed as Iterable[str], but with compute_wind_speed_if_missing=True it is consumed once by set(self._variables) and then again by list(self._variables). A valid one-shot iterable such as a generator is therefore empty on the second pass and can raise that none of the requested variables exist. Could the iterable be materialised once (for example in __init__) before both uses?

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.

1 participant