def open_virtual_dataset(
    granule: earthaccess.DataGranule,
    group: str | None = None,
    access: str = "indirect",
    load: bool = False,
) -> xr.Dataset:
    """Open a granule as a single virtual xarray Dataset.

    Uses NASA DMR++ metadata files to create a virtual xarray dataset with ManifestArrays. This virtual dataset can be used to create zarr reference files. See [https://virtualizarr.readthedocs.io](https://virtualizarr.readthedocs.io) for more information on virtual xarray datasets.

    > WARNING: This feature is current experimental and may change in the future. This feature relies on DMR++ metadata files which may not always be present for your dataset and you may get a `FileNotFoundError`.

    Parameters:
        granule:
            The granule to open
        group:
            Path to the netCDF4 group in the given file to open. If None, the root group will be opened. If the DMR++ file does not have groups, this parameter is ignored.
        access:
            The access method to use. One of "direct" or "indirect". Use direct when running on AWS, use indirect when running on a local machine.
        load:
            Create an xarray dataset with indexes and lazy loaded data.

            When true, creates a lazy loaded, numpy/dask backed xarray dataset with indexes. Note that when `load=True` all the data is now available to access but not loaded into memory. When `load=False` a virtual xarray dataset is created with ManifestArrays. This virtual dataset is a view over the underlying metadata and chunks and allows creation and concatenation of zarr reference files. This virtual dataset cannot load data on it's own and see https://virtualizarr.readthedocs.io/en/latest/ for more information on virtual xarray datasets.

    Returns:
        xarray.Dataset

    Examples:
        ```python
        >>> results = earthaccess.search_data(count=2, temporal=("2023"), short_name="SWOT_L2_LR_SSH_Expert_2.0")
        >>> vds =  earthaccess.open_virtual_dataset(results[0], access="indirect", load=False)
        >>> vds
        <xarray.Dataset> Size: 149MB
        Dimensions:                                (num_lines: 9866, num_pixels: 69,
                                                    num_sides: 2)
        Coordinates:
            longitude                              (num_lines, num_pixels) int32 3MB ...
            latitude                               (num_lines, num_pixels) int32 3MB ...
            latitude_nadir                         (num_lines) int32 39kB ManifestArr...
            longitude_nadir                        (num_lines) int32 39kB ManifestArr...
        Dimensions without coordinates: num_lines, num_pixels, num_sides
        Data variables: (12/98)
            height_cor_xover_qual                  (num_lines, num_pixels) uint8 681kB ManifestArray<shape=(9866, 69), dtype=uint8, chunks=(9866, 69...
        >>> vds.virtualize.to_kerchunk("swot_2023_ref.json", format="json")
        ```
    """
    return open_virtual_mfdataset(
        granules=[granule],
        group=group,
        access=access,
        load=load,
        parallel=False,
        preprocess=None,
    )
Open a granule as a single virtual xarray Dataset.

    Uses NASA DMR++ metadata files to create a virtual xarray dataset with ManifestArrays. This virtual dataset can be used to create zarr reference files. See [https://virtualizarr.readthedocs.io](https://virtualizarr.readthedocs.io) for more information on virtual xarray datasets.

    > WARNING: This feature is current experimental and may change in the future. This feature relies on DMR++ metadata files which may not always be present for your dataset and you may get a `FileNotFoundError`.

    Parameters:
        granule:
            The granule to open
        group:
            Path to the netCDF4 group in the given file to open. If None, the root group will be opened. If the DMR++ file does not have groups, this parameter is ignored.
        access:
            The access method to use. One of "direct" or "indirect". Use direct when running on AWS, use indirect when running on a local machine.
        load:
            Create an xarray dataset with indexes and lazy loaded data.

            When true, creates a lazy loaded, numpy/dask backed xarray dataset with indexes. Note that when `load=True` all the data is now available to access but not loaded into memory. When `load=False` a virtual xarray dataset is created with ManifestArrays. This virtual dataset is a view over the underlying metadata and chunks and allows creation and concatenation of zarr reference files. This virtual dataset cannot load data on it's own and see https://virtualizarr.readthedocs.io/en/latest/ for more information on virtual xarray datasets.

    Returns:
        xarray.Dataset

    Examples:
        ```python
        >>> results = earthaccess.search_data(count=2, temporal=("2023"), short_name="SWOT_L2_LR_SSH_Expert_2.0")
        >>> vds =  earthaccess.open_virtual_dataset(results[0], access="indirect", load=False)
        >>> vds
        <xarray.Dataset> Size: 149MB
        Dimensions:                                (num_lines: 9866, num_pixels: 69,
                                                    num_sides: 2)
        Coordinates:
            longitude                              (num_lines, num_pixels) int32 3MB ...
            latitude                               (num_lines, num_pixels) int32 3MB ...
            latitude_nadir                         (num_lines) int32 39kB ManifestArr...
            longitude_nadir                        (num_lines) int32 39kB ManifestArr...
        Dimensions without coordinates: num_lines, num_pixels, num_sides
        Data variables: (12/98)
            height_cor_xover_qual                  (num_lines, num_pixels) uint8 681kB ManifestArray<shape=(9866, 69), dtype=uint8, chunks=(9866, 69...
        >>> vds.virtualize.to_kerchunk("swot_2023_ref.json", format="json")
        ```
    
earthaccess/dmrpp_zarr.py