We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cell_method
1 parent 83905e9 commit 60a2cebCopy full SHA for 60a2ceb
lib/iris/fileformats/_nc_load_rules/helpers.py
@@ -296,6 +296,12 @@ def _split_cell_methods(nc_cell_methods: str) -> List[re.Match]:
296
for m in _CM_PARSE_NAME.finditer(nc_cell_methods):
297
name_start_inds.append(m.start())
298
299
+ # No matches? Must be malformed cell_method string; warn and return
300
+ if not name_start_inds:
301
+ msg = f"Failed to parse cell method string: {nc_cell_methods}"
302
+ warnings.warn(msg, category=iris.warnings.IrisCfLoadWarning, stacklevel=2)
303
+ return []
304
+
305
# Remove those that fall inside brackets
306
bracket_depth = 0
307
for ind, cha in enumerate(nc_cell_methods):
0 commit comments