Skip to content

Refactor open_virtual_dataset and open_virtual_mfdataset API to match virtualizarr #905

Open
@ayushnag

Description

@ayushnag

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status

      🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions