Skip to content

Coordinate Not Found #5241

Answered by trexfeathers
MargaridaS asked this question in Q&A
Apr 13, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @MargaridaS, sorry for the delay - things have been a bit hectic lately.

From your ncdump output we can see that the latitude coordinate's variable name is identical to the name of its dimension - lat(lat). Under the CF conventions this makes latitude 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, including latitude. 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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MargaridaS
Comment options

Answer selected by bjlittle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants