Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion xbout/lazyload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -350,6 +351,8 @@ def lazy_open_boutdataset(
attrs=var.attrs,
)
elif len(var.dims) == 0:
if name == "dz":
data_vars[name] = var
Comment on lines +354 to +355
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logs show the tests failing due to missing dz -- this is the only change that mentions dz, but I don't see how it could fail (this line doesn't seem to come up in the stacktrace either)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I added to fix it :-)

continue # scalars already in metadata
elif ("x" not in var.dims) and ("y" not in var.dims):
# Take DataArray from first processor
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion xbout/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading