Replies: 2 comments 2 replies
-
Not in Iris currently. Better comparison and information when comparing coords is something iris hopes to adress in the future, but for now they cube helper package may be of some use rather than inventing the wheel yourself. |
Beta Was this translation helpful? Give feedback.
-
@krikru As of For example, to get the metadata of an There is reasonably rich metadata behaviour supported that allows you to easily perform:
Note also, we have The upshot is that you can easily see the difference between two coordinates, as you asked above, but there isn't an automated way (at the moment) in which concatenate will tell you all the metadata differences. Does that help? |
Beta Was this translation helpful? Give feedback.
-
When you call
concatenate_cube
on aCubeList
object, the concatenation will fail and throw aConcatenateError
exception that says that "Dimension coordinates metadata differ" if two correspondingCoord
objects have differing metadata. Is there any robust way to check beforehand whether this metadata differs between twoCoord
objects? I can't find any method that returns the metadata of such an object.The reason I'm asking is that I have a bunch of netCDF files that I want to concatenate, and apparently some of them have slightly deviating coordinate values (they are off by something like a millionth of a degree), and others have deviating dtype (
float64
instead offloat32
), and I want to detect any discrepancy so that I can notify the user of it, and perhaps also fix it automatically. That means that I need a robust way to check not only whether twoCoord
objects are equal, but also whether their metadata is, and this comparison is not performed (at least not completely) when I just check if the two objects are equal.Beta Was this translation helpful? Give feedback.
All reactions