From 724d05fa6f3ddcd6e86f99f5b0818e119e533baf Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Thu, 9 Nov 2023 13:40:42 +0000 Subject: [PATCH] adding review comments --- lib/iris/coords.py | 9 +++------ lib/iris/util.py | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/iris/coords.py b/lib/iris/coords.py index 84d62d9624..236d3412ea 100644 --- a/lib/iris/coords.py +++ b/lib/iris/coords.py @@ -864,8 +864,8 @@ def xml_element(self, doc): element.setAttribute( "climatological", str(self.climatological) ) - if self.guess_coord: - element.setAttribute("guess_coord", str(self.guess_coord)) + if self.ignore_axis: + element.setAttribute("ignore_axis", str(self.ignore_axis)) if self.attributes: attributes_element = doc.createElement("attributes") for name in sorted(self.attributes.keys()): @@ -1782,7 +1782,7 @@ def ignore_axis(self): @ignore_axis.setter def ignore_axis(self, value): if not isinstance(value, bool): - emsg = "Ignore_axis can only be set to True or False" + emsg = "'ignore_axis' can only be set to 'True' or 'False'" raise ValueError(emsg) self._ignore_axis = value @@ -2732,9 +2732,6 @@ def __init__( Will set to True when a climatological time axis is loaded from NetCDF. Always False if no bounds exist. - * guess_coord (bool): - When True: guess_coord will guess the coord, when False it won't. - """ # Configure the metadata manager. self._metadata_manager = metadata_manager_factory(DimCoordMetadata) diff --git a/lib/iris/util.py b/lib/iris/util.py index 481d5cf171..265b619e9f 100644 --- a/lib/iris/util.py +++ b/lib/iris/util.py @@ -265,7 +265,7 @@ def guess_coord_axis(coord): axis = None - if coord.ignore_axis is True: + if hasattr(coord, "ignore_axis") and coord.ignore_axis is True: return axis elif coord.standard_name in (