Add compute_wind_speed_if_missing to XarrayDataLoader - #256
copybara-service[bot] wants to merge 1 commit into
Conversation
PiperOrigin-RevId: 962295307
|
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
left a comment
There was a problem hiding this comment.
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?
Add compute_wind_speed_if_missing to XarrayDataLoader