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

Wildcard support for list input to MultiTimeResource #180

Merged
merged 8 commits into from
Aug 15, 2024

Conversation

ppinchuk
Copy link
Collaborator

Allow MultiTimeResource to accept wildcards in list so you can do something like:

from rex import MultiYearWindResource

files = [
    "/datasets/WIND/conus/v1.0.0/wtk_conus_*.h5",
    "/scratch/ppinchuk/HRRR/HRRR*.h5",
]

with MultiYearWindResource(files) as res:
    print(res.time_index.year.unique())
--------------------------------------------
Index([2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023], dtype='int32')

Any foreseeable pitfalls here that I may be missing?

@ppinchuk ppinchuk self-assigned this Aug 13, 2024
@ppinchuk ppinchuk added the feature New feature or request label Aug 13, 2024
bnb32
bnb32 previously approved these changes Aug 14, 2024
Copy link
Collaborator

@bnb32 bnb32 left a comment

Choose a reason for hiding this comment

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

I can't think of any issues with this.

@ppinchuk ppinchuk merged commit 5ecb5fe into main Aug 15, 2024
14 of 16 checks passed
@ppinchuk ppinchuk deleted the pp/multi_time_from_list branch August 15, 2024 21:03
github-actions bot pushed a commit that referenced this pull request Aug 15, 2024
Wildcard support for list input to `MultiTimeResource`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants