-
Notifications
You must be signed in to change notification settings - Fork 5
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
Find solution to use Components both on structured and unstructured grids #29
Comments
While structured grids are most likely going to be stored as 2D arrays (e.g. Y, X in CF-conventions), unstructured grids can be stored as vectors, as an array with FillValue, or as ragged arrays (e.g. UGRID-conventions). Then, it may be a good idea to use a UGRID vector approach for both structured and unstructured grids internally in the framework for future proofing (i.e. future support for unstructured grids). For the variables themselves, a structured grid could be converted easily from a 2D array to a vector with e.g.
I think that if a Z dimension is required for the inputs of a component, it should be kept separate from Y/X: only Y/X should be vectorised. |
Another aspect we could consider as part of this issue is the fact that the |
[Related to #12]
At the moment, only structured grids are implemented as
SpaceDomain
, so effectively they are stored as 2D arrays. This means that a scienceComponent
knows the rank of the array it is going to receive, and it knows where its neighbours are (e.g. useful for stencils, or for routing).Moreover, for models like the current implementation of JULES, 2D grids can be vectorised easily since it is working on vertical columns with no lateral flow (hence no need to know where neighbours are). Therefore, JULES is readily usable on unstructured grids (e.g. the cubed-sphere of LFRic), and it would be a shame to convert 2D arrays to vectors (1D array) as part of the Component, and it would be better if the framework could provide the information as vectors directly.
So this issue is to suggest that we may want to consider/store all
SpaceDomain
as vectors, so that any geometry can be supported without for theComponent
to have to adjust to it: aComponent
would always receive a vector alongside information about where its neighbours are.The text was updated successfully, but these errors were encountered: