Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Projection lat-lon coordinates including new GridMapping objects#695

Draft
sadielbartholomew wants to merge 98 commits intoNCAS-CMS:main from
sadielbartholomew:projections-part-1-grid-mappings-infra
Draft

Projection lat-lon coordinates including new GridMapping objects #695
sadielbartholomew wants to merge 98 commits intoNCAS-CMS:main from
sadielbartholomew:projections-part-1-grid-mappings-infra

Conversation

@sadielbartholomew
Copy link
Member

@sadielbartholomew sadielbartholomew commented Sep 20, 2023
edited
Loading

Part 1 of 2 towards #628. This first part sets up the Grid Mapping class and helper function infrastructure towards interfacing with PROJ using pyproj, so that in the second part (nearly ready, but with some issues left to resolve) we can use those to invoke PROJ cs2cs functionality to transform from one coordinate reference system to another, else be informed that the transformation isn't valid or possible, which allows us to get the lat-lon coordinates for a given projection with corresponding CRS parameters where that makes physical sense.

CF-supported Grid Mappings have been modelled explicitly as objects in this first step in order to, for example:

  • allow us to define all supported Grid Mappings to be a paradigm for those and the CF map parameter arguments listed there;
  • validate the respective map parameters;
  • allow us to interface with them using our own cf.Units instead of having to convert to and work with PROJ formats for inputs (which are strings with a unit as a suffix e.g. "30D", "0.5R", etc.), where functions to convert to and from PROJ data and units are provided;
  • to facilitate future cf-plot work and integration into the cf-python codebase.

Diagrams of new class hierarchy

Generated from this PR branch using pyreverse -o png -p GRIDMAPPINGS-1 gridmappings.py when in the cf directory (large image so e.g. open out by 'Open image in new tab' or similar, click to zoom):

classes_GRIDMAPPINGS-1

Sadly the diagram generator doesn't seem to show abstract methods, so we don't see those. And it only show classes, so it doesn't indicate functions in the module either. But should still be useful.

I haven't done a thorough self-review yet, but we can cross-reference this with Appendix F of the Conventions doc to check everything matches up.

Copy link
Collaborator

Hi Sadie - thanks for the summary - that's how I remember it, too!

sadielbartholomew reacted with hooray emoji

@sadielbartholomew sadielbartholomew changed the title (削除) Projection lat-lon coordinates part 1: GridMapping objects (削除ここまで) (追記) Projection lat-lon coordinates including new GridMapping objects (追記ここまで) Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /