Coordinate Not Found #5241
-
Dear SciTools iris team, I contact you to ask about an error when reading the coordinate 'latitude'. When I load the file
However the file already has the coordinate 'latitude':
Do you know why is this error appearing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @MargaridaS, sorry for the delay - things have been a bit hectic lately. From your By specifying
|
Beta Was this translation helpful? Give feedback.
Hi @MargaridaS, sorry for the delay - things have been a bit hectic lately.
From your
ncdump
output we can see that thelatitude
coordinate's variable name is identical to the name of its dimension -lat(lat)
. Under the CF conventions this makeslatitude
a dimension coordinate, and Iris recognises this.By specifying
dim_coords=False
in your coordinate search, you are filtering out all dimension coordinates from the search result, includinglatitude
. You should either use:ds[0].coord('latitude')
ds[0].coord('latitude', dim_coords=True)
This isn't necessary in this case because you know there is only one coordinate called
latitude
.