diff --git a/yt/frontends/cf_radial/data_structures.py b/yt/frontends/cf_radial/data_structures.py index 436517b3004..1c1309510d0 100644 --- a/yt/frontends/cf_radial/data_structures.py +++ b/yt/frontends/cf_radial/data_structures.py @@ -310,11 +310,14 @@ def _is_valid(cls, filename: str, *args, **kwargs) -> bool: nc4_file = NetCDF4FileHandler(filename) with nc4_file.open_ds(keepweakref=True) as ds: con = "Conventions" # the attribute to check for file conventions + # note that the attributes here are potentially space- or + # comma-delimited strings, so we concatenate a single string + # to search for a substring. cons = "" # the value of the Conventions attribute - for c in [con, con.lower()]: + for c in [con, con.lower(), "Sub_" + con.lower()]: if hasattr(ds, c): cons += getattr(ds, c) - is_cfrad = "CF/Radial" in cons + is_cfrad = "CF/Radial" in cons or "CF-Radial" in cons except (OSError, AttributeError, ImportError): return False