Skip to content

Commit 33d9132

Browse files
authored
changing open_cfradial1_datatree engine from 'netcdf4' to 'h5netcdf' (#195)
* changing open_cfradial1_datatree engine from 'netcdf4' to 'h5netcdf' * passing engine as a kwarg in open_cfradial_datatree function * running pre-commit * adding new development version, issue and, and PR to history.md file * fixing some typos
1 parent 482952b commit 33d9132

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/history.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# History
22

3+
## 0.6.2 (2024-08-12)
4+
5+
* 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)
6+
37
## 0.6.1 (2024-08-07)
48

59
* MNT: minimize CI ({pull}`192`) by [@kmuehlbauer](https://github.com/kmuehlbauer).

xradar/io/backends/cfradial1.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -327,22 +327,26 @@ def open_cfradial1_datatree(filename_or_obj, **kwargs):
327327
Import optional mandatory data and metadata, defaults to ``True``.
328328
site_coords : bool
329329
Attach radar site-coordinates to Dataset, defaults to ``True``.
330+
engine: str
331+
Engine that will be passed to Xarray.open_dataset, defaults to "netcdf4"
330332
331333
Returns
332334
-------
333335
dtree: datatree.DataTree
334336
DataTree with CfRadial2 groups.
335337
"""
338+
336339
# handle kwargs, extract first_dim
337340
first_dim = kwargs.pop("first_dim", "auto")
338341
optional = kwargs.pop("optional", True)
339342
site_coords = kwargs.pop("site_coords", True)
340343
sweep = kwargs.pop("sweep", None)
344+
engine = kwargs.pop("engine", "netcdf4")
341345

342346
# open root group, cfradial1 only has one group
343347
# open_cfradial1_datatree only opens the file once using netcdf4
344348
# and retrieves the different groups from the loaded object
345-
ds = open_dataset(filename_or_obj, engine="netcdf4", **kwargs)
349+
ds = open_dataset(filename_or_obj, engine=engine, **kwargs)
346350

347351
# create datatree root node with required data
348352
root = _get_required_root_dataset(ds, optional=optional)

0 commit comments

Comments
 (0)