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

Refactor open_virtual_dataset and open_virtual_mfdataset API to match virtualizarr #905

Open
ayushnag opened this issue Dec 17, 2024 · 0 comments

Comments

@ayushnag
Copy link
Collaborator

ayushnag commented Dec 17, 2024

Currently earthaccess.open_virtual_mfdataset is implementing some logic that should be in virtualizarr. We should remove this logic from earthaccess and simplify the current implementation. Then the earthaccess API will only add logic for unwrapping results and logic for a few convenience params like load and access. The rest of the arguments will be directly passed to virtualizarr. The change to open_virtual_mfdataset needs virtualizarr.open_virtual_mfdataset to be implemented upstream. cc @betolink @TomNicholas

Here is my suggested API change:

def open_virtual_dataset(
    granule: earthaccess.DataGranule,
    access: str = "indirect",
    load: bool = False,
    use_dmrpp: bool = True,
   **vz_open_virtual_dataset_kwargs
) -> xr.Dataset:

def open_virtual_mfdataset(
    granule: list[earthaccess.DataGranule],
    access: str = "indirect",
    load: bool = False,
    use_dmrpp: bool = True,
   **vz_open_virtual_mfdataset_kwargs
) -> xr.Dataset:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant