From f5a3f1bec52445cbbdf762db41de0aa1671e05ce Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 9 Jan 2026 12:53:39 +0100 Subject: [PATCH 1/3] add known bounds dims --- xarray_esgf/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xarray_esgf/client.py b/xarray_esgf/client.py index 0e5fe0e..910fa7b 100644 --- a/xarray_esgf/client.py +++ b/xarray_esgf/client.py @@ -25,6 +25,7 @@ "grid_label", "version", ] +BOUNDS_DIMS = {"bnds", "axis_nbounds"} LOGGER = logging.getLogger() @@ -158,7 +159,7 @@ def open_dataset( ds = ds.set_coords([ name for name, da in ds.variables.items() - if "bnds" in da.dims or "time" not in da.dims + if (set(da.dims) & BOUNDS_DIMS) or "time" not in da.dims ]) ds = ds.expand_dims({dim: [dataset_id_dict[dim]] for dim in concat_dims}) combined_datasets[dataset_id] = ds From aacb620afe13b11546c0e964c99f837533a57005 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 9 Jan 2026 12:57:56 +0100 Subject: [PATCH 2/3] cleanup --- xarray_esgf/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray_esgf/client.py b/xarray_esgf/client.py index 910fa7b..97b1f97 100644 --- a/xarray_esgf/client.py +++ b/xarray_esgf/client.py @@ -159,7 +159,7 @@ def open_dataset( ds = ds.set_coords([ name for name, da in ds.variables.items() - if (set(da.dims) & BOUNDS_DIMS) or "time" not in da.dims + if set(da.dims) & BOUNDS_DIMS or "time" not in da.dims ]) ds = ds.expand_dims({dim: [dataset_id_dict[dim]] for dim in concat_dims}) combined_datasets[dataset_id] = ds From 9b72212633940c80dff1ebc783c852cf474eb18e Mon Sep 17 00:00:00 2001 From: malmans2 Date: Fri, 9 Jan 2026 13:01:45 +0100 Subject: [PATCH 3/3] cleanup --- xarray_esgf/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray_esgf/client.py b/xarray_esgf/client.py index 97b1f97..6ceec20 100644 --- a/xarray_esgf/client.py +++ b/xarray_esgf/client.py @@ -159,7 +159,7 @@ def open_dataset( ds = ds.set_coords([ name for name, da in ds.variables.items() - if set(da.dims) & BOUNDS_DIMS or "time" not in da.dims + if BOUNDS_DIMS.intersection(da.dims) or "time" not in da.dims ]) ds = ds.expand_dims({dim: [dataset_id_dict[dim]] for dim in concat_dims}) combined_datasets[dataset_id] = ds