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

Give access to all neighbouring elements for any space domain element #12

Open
ThibHlln opened this issue Nov 13, 2020 · 2 comments
Open
Labels
functionality New feature or request

Comments

@ThibHlln
Copy link
Member

ThibHlln commented Nov 13, 2020

When the framework moves away from only supporting structured grids, an increment on X or Y will not work to find all neighbours of any given mesh element, so it needs to provide a functionality to query where the neighbours of any given mesh element are.

This is required when interpolating between two grids: if two cells are neighbours and it needs to be interpolated onto another grid, the interpolation scheme will need to know about this neighbouring relationship.

It would also be a useful facility to provide to model developers, e.g. when they need to route flow laterally (whether on the surface, or under the surface), they can find where the neighbours upstream and downstream are.

@ThibHlln ThibHlln added the functionality New feature or request label Nov 20, 2020
@ThibHlln ThibHlln added this to the v1.0.0 milestone Dec 2, 2020
@ThibHlln
Copy link
Member Author

ThibHlln commented Mar 4, 2021

For regular grids (LatLonGrid, RotatedLatLonGrid, BritishNationalGrid), the flow_direction attribute can provide some of this information.

For irregular grids, following the UGRID conventions https://ugrid-conventions.github.io, this information would be stored under the face_face_connectivity variable. However, I don't think the convention supports a directed connectivity. This may have to be inferred from topographic information on the faces?

@ThibHlln
Copy link
Member Author

ThibHlln commented Mar 11, 2021

Related to the need for neighbouring relationships and directed connectivity, at the moment the flow_direction assumes that the connectivity is mono-directional, but there may be a need to consider multi-directional flow, e.g. if grid cell contains a ridge, there is a case for a fraction of the runoff towards two of more valleys.

E.g. for structured grids, groundwater models (MODFLOW) consider up to 8 neighbouring cells, and determine the ratio of flow going to each neighbour based on the hydraulic head gradient between a cell and its 8 neighbours. For surface runoff, some components may want to apply a similar approach, based on elevation gradients?

The flow_direction attribute may need to store a vector of 8 values for each grid cell containing weights to attribute fractions of runoff to each neighbour. A mono-directional case would still be supported by assigning all the weight to the given unique flow direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functionality New feature or request
Projects
Status: To do
Development

No branches or pull requests

1 participant