diff --git a/docs/history.md b/docs/history.md index 888e612e..df9ec518 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,5 +1,9 @@ # History +## 0.6.2 (2024-08-12) + +* FIX: Passing 'engine' kwarg in "open_cfradial1_datatree" method to enable fsspec.open when using url ({issue}`194`) by [@aladinor](https://github.com/aladinor), ({pull}`195`) by [@aladinor](https://github.com/aladinor) + ## 0.6.1 (2024-08-07) * MNT: minimize CI ({pull}`192`) by [@kmuehlbauer](https://github.com/kmuehlbauer). diff --git a/xradar/io/backends/cfradial1.py b/xradar/io/backends/cfradial1.py index 08ceca40..084d46cb 100644 --- a/xradar/io/backends/cfradial1.py +++ b/xradar/io/backends/cfradial1.py @@ -327,22 +327,26 @@ def open_cfradial1_datatree(filename_or_obj, **kwargs): Import optional mandatory data and metadata, defaults to ``True``. site_coords : bool Attach radar site-coordinates to Dataset, defaults to ``True``. + engine: str + Engine that will be passed to Xarray.open_dataset, defaults to "netcdf4" Returns ------- dtree: datatree.DataTree DataTree with CfRadial2 groups. """ + # handle kwargs, extract first_dim first_dim = kwargs.pop("first_dim", "auto") optional = kwargs.pop("optional", True) site_coords = kwargs.pop("site_coords", True) sweep = kwargs.pop("sweep", None) + engine = kwargs.pop("engine", "netcdf4") # open root group, cfradial1 only has one group # open_cfradial1_datatree only opens the file once using netcdf4 # and retrieves the different groups from the loaded object - ds = open_dataset(filename_or_obj, engine="netcdf4", **kwargs) + ds = open_dataset(filename_or_obj, engine=engine, **kwargs) # create datatree root node with required data root = _get_required_root_dataset(ds, optional=optional)