diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index b16fb83e..e8a753dc 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -20,7 +20,7 @@ jobs: if: always() strategy: matrix: - python-version: ["3.12", "3.13", "3.14", "3.x"] + python-version: ["3.12", "3.13", "3.14"] fail-fast: false steps: diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 66ee6182..55bfbef7 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -20,7 +20,7 @@ jobs: if: always() strategy: matrix: - python-version: ["3.12", "3.13", "3.14", "3.x"] + python-version: ["3.12", "3.13", "3.14"] fail-fast: false steps: diff --git a/xbout/lazyload.py b/xbout/lazyload.py index aeb59940..e3eb71e7 100644 --- a/xbout/lazyload.py +++ b/xbout/lazyload.py @@ -338,6 +338,7 @@ def lazy_open_boutdataset( ) # Process all data variables + coords = {} data_vars = {} for name, var in ds.data_vars.items(): if "x" in var.dims and "y" in var.dims: @@ -350,6 +351,8 @@ def lazy_open_boutdataset( attrs=var.attrs, ) elif len(var.dims) == 0: + if name == "dz": + data_vars[name] = var continue # scalars already in metadata elif ("x" not in var.dims) and ("y" not in var.dims): # Take DataArray from first processor @@ -360,7 +363,6 @@ def lazy_open_boutdataset( f"Variable '{name}' has only one of x/y dimensions and will be skipped" ) - coords = {} if "t_array" in ds: coords["t"] = ds["t_array"].values diff --git a/xbout/load.py b/xbout/load.py index 8cf714db..a13b2136 100644 --- a/xbout/load.py +++ b/xbout/load.py @@ -291,7 +291,7 @@ def attrs_remove_section(obj, section): if "dump" in input_type or "restart" in input_type: def is_netcdf_collection(datapath): - if not isinstance(datapath, str): + if not _is_path(datapath): return None # Expand globs into a list of files p = Path(datapath)