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

Grids, meet architecture #1998

Closed
wants to merge 1 commit into from
Closed

Grids, meet architecture #1998

wants to merge 1 commit into from

Conversation

glwagner
Copy link
Member

@glwagner glwagner commented Oct 5, 2021

This PR adds an architecture property to the RegularRectilinearGrid and VerticallyStretchedRectilinearGrid. Eventually, this PR will remove the architecture property from all models and fields. The new API will require architecture to be specified once when building the grid and never thereafter.

This major change to the API is crucial for supporting a clean, simple API for grid metrics stored in arrays (all cases except the edge case of a fully regular grid). In the new API, both the architecture and floating point type are exclusive properties of grid. In addition this change will simplify the construction of models on distributed architectures and will eliminate the need for special model constructors for that case.

Ultimately, we hope to go beyond this change to support just three grids:

  1. RectilinearGrid
  2. LatitudeLongitudeGrid
  3. OrthogonalSphericalShellGrid

In the first two cases, "regularity" is established if the grid metrics are numbers (rather than arrays or functions). This is another major change to the API (and a major internal refactor) that will hopefully reduce, simplify, and generalize grid constructors and applications.

Closes #1825.

@glwagner
Copy link
Member Author

Closing this because @simone-silvestri will open a PR soon that supercedes it!

@glwagner glwagner closed this Oct 21, 2021
@glwagner glwagner deleted the grid-architecture branch October 21, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we store architecture in grid?
1 participant