Skip to content

Commit

Permalink
adding open_datatree backend keyword arguments for netCDF4
Browse files Browse the repository at this point in the history
  • Loading branch information
aladinor committed Jul 1, 2024
1 parent 179b696 commit 563b5db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions xarray/backends/netCDF4_.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,12 @@ def open_datatree(
use_cftime=None,
decode_timedelta=None,
group: str | Iterable[str] | Callable | None = None,
format="NETCDF4",
clobber=True,
diskless=False,
persist=False,
lock=None,
autoclose=False,
**kwargs,
) -> DataTree:
from xarray.backends.api import open_dataset
Expand All @@ -691,6 +697,12 @@ def open_datatree(
store = NetCDF4DataStore.open(
filename_or_obj,
group=group,
format=format,
clobber=clobber,
diskless=diskless,
persist=persist,
lock=lock,
autoclose=autoclose,
)
if group:
parent = NodePath("/") / NodePath(group)
Expand Down

0 comments on commit 563b5db

Please sign in to comment.