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

Xarray + rex #190

Open
grantbuster opened this issue Dec 20, 2024 · 0 comments
Open

Xarray + rex #190

grantbuster opened this issue Dec 20, 2024 · 0 comments
Labels
feature New feature or request

Comments

@grantbuster
Copy link
Member

Why this feature is necessary:
Lots of people use xarray as a more common file handler to spatiotemporal meteorological data. Xarray can work with NREL h5 files but you get a bunch of "phony dims" that aren't very useful. Would be nice to have a way to open NREL data with xarray with meta/time_index used appropriately and data unscaled on read. Also would be nice to allow for remote access to h5 files on s3 with xarray.

A possible solution is:
I think we could add a new backend in rex like this: https://docs.xarray.dev/en/latest/internals/how-to-add-new-backend.html

I have considered the following alternatives:
Currently you can open s3 files remotely like this:

# for backend need to `conda install conda install h5netcdf`
fp = "s3://nrel-pds-nsrdb/current/nsrdb_1998.h5"
s3 = s3fs.S3FileSystem()
s3f = s3.open(fp, "rb")
dset = xr.open_dataset(s3f, phony_dims='sort')

which gives you something ugly like this:
image

Additional context
This might be required for further collaboration with external orgs like EPRI.

Charge code
Maybe reV maintenance budget?

Urgency / Timeframe
Currently not urgent.

@grantbuster grantbuster added the feature New feature or request label Dec 20, 2024
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

No branches or pull requests

1 participant