Different recognized coordinates when calling variable by standard name

Open
#357 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

No file, test, or entry point is named. Start by reducing the two reported access expressions to a minimal dataset that reproduces the difference, then trace how cf-xarray resolves coordinates for a variable name versus its standard name. Done means both access paths consistently recognize the longitude coordinate, with a regression test covering the case.

Written by the indexing model from the issue text.

Description

documentation

I know this isn't good form, but I am going to describe my problem to see if anyone has an idea of a direction to go, without a good example to start. I am using several libraries together and making an example case seems difficult.

Here is the base question though:
ds['zeta'].cf['longitude'] worked but ds.cf['sea_surface_height_above_mean_sea_level'].cf['longitude'] did not

in other words, when I used the variable name to access a variable in my dataset, cf-xarray knew the mapping for longitude. But, when I referred to the variable by its standard name that cf-xarray recognized, cf-xarray did not then know the mapping for longitude. This seems weird right? Any ideas of what could be wrong?

Dominant language
Python
Stars
181
Forks
49
Avg merge
43m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xarray-contrib/cf-xarray

All issues in xarray-contrib/cf-xarray

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.