-
Hello, I am using iris to analyse a series of data files for the same parameter under the same spatial grids but for different years. However, I encounter following error when I call concatenate_cube(). I believe this is due to inconsistency in the data files. But I don't know how to spot this. Best, Lianghai Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Lianghai You're correct, this is a result of a inconsistency in the data files. Iris merging/concatenate is very picky about the input data files which can be an issue with malformed CMIP5 data. As a general rule, when iris is giving a very non-specific concatenation error like this, the cause is a difference in the coordinates you are trying to concatenate over (latitude & and longitude, in this case). So I had a look at the example data you provided.
So there's something wrong with the latitude coordinates. In particular
There's a issue with the last cube in the list. If we try to concatenate the first two cubes, that works, confirming our suspicions. But given we probably need the data from the third cube and it should be identical, what is the problem?
So we can see here that for a a few points, there is a tiny (-9.9475983e-14, it' mostly likely just a floating point rounding error) difference in latitude points in the data. If you examine the bounds, you will find the same tiny differences. So how can we fix this? Given that this is all model data from the same model on the same spatial grid, we can just workaround this by assigning the latitude points and bounds for one of the cubes to all of them. Here is a fix for your example.
|
Beta Was this translation helpful? Give feedback.
Hi Lianghai
You're correct, this is a result of a inconsistency in the data files. Iris merging/concatenate is very picky about the input data files which can be an issue with malformed CMIP5 data. As a general rule, when iris is giving a very non-specific concatenation error like this, the cause is a difference in the coordinates you are trying to concatenate over (latitude & and longitude, in this case). So I had a look at the example data you provided.
So there's somethin…