Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an
architecture
property to theRegularRectilinearGrid
andVerticallyStretchedRectilinearGrid
. Eventually, this PR will remove thearchitecture
property from all models and fields. The new API will requirearchitecture
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:
RectilinearGrid
LatitudeLongitudeGrid
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.