Skip to content

Add CRS accessor for cartopy #577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Add CRS accessor for cartopy #577

wants to merge 7 commits into from

Conversation

aulemahal
Copy link
Contributor

@aulemahal aulemahal commented Jul 2, 2025

This fixes #395.

  • Add a crs accessor to both the Dataset and DataArray accessors.
    • For Datasets, we can only return something if only one grid mapping is defined.
    • For DataArrays, the grid mapping must be a coordinate
    • For both, the absence of a grid mapping and the presence of a "longitude" entry in the dataset is assumed to mean that the grid mapping is "latitude_longitude". CF allows an absent grid mapping for this CRS.
  • Include this in the plotting function (?)
  • Add tests

@dcherian
Copy link
Contributor

dcherian commented Jul 3, 2025

Also, +1 to automatic use in the plotting function, that was my initial intent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set cartopy crs automatically
2 participants