From fb90a18c874e51d326522f508b306f83e81338f0 Mon Sep 17 00:00:00 2001 From: SimonPeatman Date: Sun, 24 May 2020 14:11:40 +0100 Subject: [PATCH 1/3] var_name in AuxCoord created by trajectory.interpolate() --- lib/iris/analysis/trajectory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/iris/analysis/trajectory.py b/lib/iris/analysis/trajectory.py index 3a1f71a98b..d699b1c416 100644 --- a/lib/iris/analysis/trajectory.py +++ b/lib/iris/analysis/trajectory.py @@ -297,6 +297,7 @@ def interpolate(cube, sample_points, method=None): points = np.array([coord.points.flatten()[0]] * trajectory_size) new_coord = iris.coords.AuxCoord( points, + var_name=coord.var_name, standard_name=coord.standard_name, long_name=coord.long_name, units=coord.units, From 1b2ee4ed4b556a3fde919b0c484b767ed6943b18 Mon Sep 17 00:00:00 2001 From: SimonPeatman Date: Fri, 11 Sep 2020 12:03:26 +0100 Subject: [PATCH 2/3] Updated tri_polar_latitude_slice.cml --- .../tests/results/trajectory/tri_polar_latitude_slice.cml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/iris/tests/results/trajectory/tri_polar_latitude_slice.cml b/lib/iris/tests/results/trajectory/tri_polar_latitude_slice.cml index 2224d12028..701ca7beb7 100644 --- a/lib/iris/tests/results/trajectory/tri_polar_latitude_slice.cml +++ b/lib/iris/tests/results/trajectory/tri_polar_latitude_slice.cml @@ -77,7 +77,7 @@ + 86.2794, 87.9471]" shape="(90,)" standard_name="latitude" units="Unit('degrees')" value_type="float32" var_name="nav_lat"> @@ -87,7 +87,7 @@ + -88.8945, -100.0]" shape="(90,)" standard_name="longitude" units="Unit('degrees')" value_type="float32" var_name="nav_lon"> From 8a0ddfaf38af58bf87ea7ef51cf7ddb78142279e Mon Sep 17 00:00:00 2001 From: SimonPeatman Date: Fri, 11 Sep 2020 21:31:21 +0100 Subject: [PATCH 3/3] What's New for #3718 --- docs/iris/src/whatsnew/latest.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index a994a994e9..559d2483c1 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -126,6 +126,11 @@ Incompatible Changes Prior to Iris ``3.0.0``, these cases defaulted to ``units='1'``. See :pull:`3795`. +* `Simon Peatman `_ added attribute + ``var_name`` to coordinates created by the + :func:`iris.analysis.trajectory.interpolate` function. This prevents + duplicate coordinate errors in certain circumstances. (:pull:`3718`). + Internal ========