From 7bf14d1b5751947a28f3497141fd5a7b88af3e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=B6lling?= Date: Mon, 14 Sep 2020 12:04:33 +0200 Subject: [PATCH 1/2] opendap driver: make chunks argument optional The xarray.open_dataset function allows `None` as a `chunks` specification. This changed allows this as well for the opendap driver and thus makes the `chunks` argument in the catalog optional. --- intake_xarray/opendap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intake_xarray/opendap.py b/intake_xarray/opendap.py index ccb26d8..8b45cd2 100644 --- a/intake_xarray/opendap.py +++ b/intake_xarray/opendap.py @@ -38,7 +38,7 @@ class OpenDapSource(DataSourceMixin): """ name = 'opendap' - def __init__(self, urlpath, chunks, auth="esgf", xarray_kwargs=None, metadata=None, + def __init__(self, urlpath, chunks=None, auth="esgf", xarray_kwargs=None, metadata=None, **kwargs): self.urlpath = urlpath self.chunks = chunks From 26e4e18f41241fbbdfbb8762528912cc77c85b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=B6lling?= Date: Mon, 14 Sep 2020 15:07:56 +0200 Subject: [PATCH 2/2] opendap driver: added None as possible type for chunks parameter --- intake_xarray/opendap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intake_xarray/opendap.py b/intake_xarray/opendap.py index 8b45cd2..73280b2 100644 --- a/intake_xarray/opendap.py +++ b/intake_xarray/opendap.py @@ -22,7 +22,7 @@ class OpenDapSource(DataSourceMixin): ---------- urlpath: str Path to source file. - chunks: int or dict + chunks: None, int or dict Chunks is used to load the new dataset into dask arrays. ``chunks={}`` loads the dataset with dask using a single chunk for all arrays.