Skip to content

Commit

Permalink
fix metek
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer committed Oct 16, 2024
1 parent a72b48c commit 0307b86
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xradar/io/backends/metek.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import numpy as np
import xarray as xr
from datatree import DataTree
from xarray.backends.common import AbstractDataStore, BackendArray, BackendEntrypoint
from xarray.backends.file_manager import CachingFileManager
from xarray.backends.store import StoreBackendEntrypoint
Expand Down Expand Up @@ -615,7 +614,7 @@ def open_dataset(


def open_metek_datatree(filename_or_obj, **kwargs):
"""Open Metek MRR2 dataset as :py:class:`datatree.DataTree`.
"""Open Metek MRR2 dataset as :py:class:`xarray.DataTree`.
Parameters
----------
Expand Down Expand Up @@ -644,7 +643,7 @@ def open_metek_datatree(filename_or_obj, **kwargs):
Returns
-------
dtree: datatree.DataTree
dtree: xarray.DataTree
DataTree
"""
# handle kwargs, extract first_dim
Expand Down Expand Up @@ -674,6 +673,6 @@ def open_metek_datatree(filename_or_obj, **kwargs):
ds.insert(0, xr.Dataset()) # open_dataset(filename_or_obj, group="/"))

# create datatree root node with required data
dtree = DataTree(data=_assign_root(ds), name="root")
dtree = xr.DataTree(dataset=_assign_root(ds), name="root")
# return datatree with attached sweep child nodes
return _attach_sweep_groups(dtree, ds[1:])

0 comments on commit 0307b86

Please sign in to comment.