-
Notifications
You must be signed in to change notification settings - Fork 297
Description
✨ Feature Request
As discovered in #5576, calling concatenate_cube()
on cubes where the MeshCoord
s appear identical, but are derived from non-identical Mesh
es, produces this un-informative error:
ConcatenateError: failed to concatenate into a single cube.
An unexpected problem prevented concatenation.
This is unlike other concatenation errors that hint at the potential blockers (e.g. different coordinates). We should add an informative error about differences in the cubes' Mesh
es.
I'm unaware if merging has similar problems, but this should also be looked into.
Motivation
Concatenation and merging are both a common use of Iris, and rather difficult to get right. Various errors attempt to help the user understand problems; without these errors the problem becomes almost impossible to debug and users are forced to as developers for help. If we can provide more information about impossible concatenation/merging then we should.
Additional context
I believe this stems from the fact that users are led to expect differences in coordinate values and metadata to be the problem, but MeshCoord
equality ALSO checks Mesh
equality. The concatenate code is unaware of this so it becomes an 'invisible' concern.