Skip to content
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

Allow MeshCoord to have a coord-system #6016

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

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Jun 20, 2024

This makes a MeshCoord have the coord-system of the appropriate location coordinate.

Note though that, as loaded from NetCDF-CF, location coords can't actually have a coord-system at present.
Because the load rules only call build_auxiliary_coordinate in one place, and a coord-system (though supported) is never passed :

In CF terms, this is because mesh coords are (at best) aux-coords of the data variable, and never dimension coords.
And a grid-mapping can currently only apply to dim-coords, because we don't yet support the extended grid-mapping syntax

However ... this does fix the copy error caused by a manually added coord-system

@pp-mo pp-mo marked this pull request as draft June 20, 2024 16:20
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.76%. Comparing base (d16628a) to head (0b2c4ab).
Report is 10 commits behind head on main.

Files Patch % Lines
lib/iris/experimental/ugrid/mesh.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6016      +/-   ##
==========================================
- Coverage   89.78%   89.76%   -0.02%     
==========================================
  Files          90       90              
  Lines       22945    22991      +46     
  Branches     5026     5031       +5     
==========================================
+ Hits        20602    20639      +37     
- Misses       1612     1621       +9     
  Partials      731      731              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pp-mo pp-mo changed the title MeshCoord coord-system comes from location coords. Fix MeshCoord.cop… Allow MeshCoord to have a coord-system Jun 20, 2024
return None
"""The coordinate-system of a MeshCoord comes from its origin coords."""
select_kwargs = {
f"include_{self.location}s": True,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thoughts, by analogy with #4860 this should probably always use "include_nodes".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
2 participants