atlas
atlas copied to clipboard
Regional matching mesh partitioning
Is your feature request related to a problem? Please describe.
The matching mesh partitioning in all types but the cubed sphere requires grid.domain().global()
. This is enforced by the ASSERT
in
https://github.com/ecmwf/atlas/blob/e4324c8cc4ac9e0e31d583dcc70eca16892c57af/src/atlas/grid/detail/partitioner/MatchingMeshPartitionerSphericalPolygon.cc#L43
https://github.com/ecmwf/atlas/blob/e4324c8cc4ac9e0e31d583dcc70eca16892c57af/src/atlas/grid/detail/partitioner/MatchingMeshPartitionerLonLatPolygon.cc#L47
https://github.com/ecmwf/atlas/blob/e4324c8cc4ac9e0e31d583dcc70eca16892c57af/src/atlas/grid/detail/partitioner/MatchingMeshPartitionerBruteForce.cc#L88
but not in https://github.com/ecmwf/atlas/blob/develop/src/atlas/grid/detail/partitioner/MatchingMeshPartitionerCubedSphere.cc I don't understand why this is only allowed for cubed sphere?
This prevent for example functionality for a regional domain to be regridded (i.e. changing its resolution). For example the lambert projections are using SphericalPolygon for matching mesh. Most of the lambert projected model grid are regional, as far as I know.
Describe the solution you'd like
We could allow grid.domain().regional()
in matching mesh for structured grids but checking if the coordinates of the 4 corners or the two domains are matching, this will ensure that the problem is well posed. But I am sure there must be other considerations that I am not aware of.
Describe alternatives you've considered
No response
Additional context
No response
Organisation
JCSDA
I suppose it is aborting because it is known not to work, and rather than aborting somewhere with something obscure deep down, it is already aborting at higher level.
Please create a concrete use case that you need to work, with some minimal code, and I am happy to then gauge how much work it would be to get it working.
I could try to do that but I would need to extract things from the repos I am working on.