Skip to content
Draft
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
5 changes: 5 additions & 0 deletions lib/ncdata/dataset_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def __setattr__(self, attr, value):
else:
self.setncattr(attr, value)

def set_auto_chartostring(self, value):
if bool(value):
msg = "Cannot enable 'auto_chartostring' for Nc4Dataselike or Nc4VariableLike."
raise ValueError()


class Nc4DatasetLike(_Nc4DatalikeWithNcattrs):
"""
Expand Down
1 change: 1 addition & 0 deletions tests/data_testcase_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ def standard_testcase(request, session_testdir):
# """
"small_rotPole_precipitation",
"small_FC_167",
"test_monotonic_coordinate",
],
# Xarray can save ~anything
"save": [r"test_monotonic_coordinate"],
Expand Down
16 changes: 13 additions & 3 deletions tests/integration/test_iris_xarray_roundtrips.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,19 @@ def test_roundtrip_ixi(standard_testcase, use_irislock, adjust_chunks):
"testdata____ugrid__21_triangle_example",
# Problem with units on time bounds
"label_and_climate__small_FC_167",
# Broken UGRID files now won't load in Iris >= 3.10
"unstructured_grid__mesh_C12",
"_unstructured_grid__theta_nodal_xios",
# # Broken UGRID files now won't load in Iris >= 3.10
# "unstructured_grid__mesh_C12",
# "_unstructured_grid__theta_nodal_xios",
# **No** mesh files will now roundtrip, since xarray 2026.04.0.
# This is because xarray now normalises the array type when loading
# from ncdata, removing masks and converting to nanarrays (thus making ints
# into floats).
# Previously we could create xarray Datasets with masked integer variables
# as data -- though that was alwaysobviously a bit tricksy.
# Iris can't accept the new form as it insists on integer types for
# mesh connectivities :-(
# TODO: do something to get this working again?
"unstructured",
]
)
if any(key in standard_testcase.name for key in exclude_case_keys):
Expand Down
Loading