axis attribute missing for lat/lon when using guess_coord_axis

Open
#368 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start by locating the guess_coord_axis entry point and reviewing how it handles lat and lon coordinates. Add or update focused tests for the inferred metadata, and verify that latitude receives axis Y and longitude receives axis X while existing behavior remains intact.

Written by the indexing model from the issue text.

Description

Hey there,

when using guess_coord_axis with lat/lon coords, the axis attribute is not added. The CF-Conventions states:

Optionally, the latitude type may be indicated additionally by providing the standard_name attribute with the value latitude, and/or the axis attribute with the value Y.

See: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#latitude-coordinate

So, the current behavior is not wrong, but I think it would be nice to have the axis attributes generated for lat/lon as well for consistency.

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.