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

Add xarray support #38

Open
sandorkertesz opened this issue Sep 19, 2024 · 2 comments
Open

Add xarray support #38

sandorkertesz opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sandorkertesz
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The goal is to add the same (limited) support to xarray that is currently available for GRIB fieldlists.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Organisation

ECMW

@sandorkertesz sandorkertesz added the enhancement New feature or request label Sep 19, 2024
@sandorkertesz sandorkertesz self-assigned this Sep 19, 2024
@HCookie
Copy link
Member

HCookie commented Sep 23, 2024

First pass with quite manual usage implemented in
https://github.com/ecmwf/earthkit-regrid/tree/feature/xarray_interpolator

@sandorkertesz
Copy link
Collaborator Author

@HCookie , if the Xarray is generated by earthkit-data (develop) you can get the input gridspec for interpolate() like this:

>>> import earthkit.data as ekd
>>> ds_ek = ekd.from_source("sample", "pl.grib")
>>> r = ds_ek.to_xarray()
>>> r["t"].earthkit.metadata.gridspec
GridSpec({'type': 'regular_ll',  ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants