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

Better transition mesh size for subetting script #85

Closed
SorooshMani-NOAA opened this issue May 16, 2023 · 2 comments · Fixed by #110
Closed

Better transition mesh size for subetting script #85

SorooshMani-NOAA opened this issue May 16, 2023 · 2 comments · Fixed by #110
Assignees

Comments

@SorooshMani-NOAA
Copy link
Collaborator

Right now the transition zone between high and low resolution mesh regions are meshed without specifying any mesh size, hence the transition is usually from a low-resolution size, to a larger size and then smaller to a high-resolution size. At the very least, it might make more sense if it doesn't go larger than the adjacent mesh sizes on either of the sides.

@SorooshMani-NOAA SorooshMani-NOAA self-assigned this May 16, 2023
@SorooshMani-NOAA
Copy link
Collaborator Author

SorooshMani-NOAA commented Sep 13, 2023

Using trianlge this is being attempted:

Florence 2018 Ian 2022
image image
Michael 2018 Irma 2017
image image

For comparison, see the old approach for Ian (it actually used to fail due to non conformal interface):

New Old
image image

@SorooshMani-NOAA
Copy link
Collaborator Author

SorooshMani-NOAA commented Sep 21, 2023

During testing of the updated algorithm some issues were revealed that are being worked on.

The following has been fixed (cc'ing since the issue is on a private repo):

The issue here is related to how the new method generates mesh for the buffer zone between low and high res mesh.

The logic is use Jigsaw to mesh the buffer zone, then get all the internal nodes of this mesh and use it along with buffer zone's shape (that exactly interfaces with both low and high-res mesh) to triangulate without any steiner points added.

The issue is, since Jigsaw doesn't follow the boundaries exactly, it might result in an internal node that is very close to the boundary of the buffer zone exact shape.

image

In the snapshot the polygon is the buffer zone shape, the black mesh is the jigsaw mesh generated as described above, the points are the internal points of the black mesh, and the green mesh is the final buffer mesh as a result of this error. As you can see one internal point is very close to the boundary of the polygon, resulting in the problematic green mesh.

To fix this, I now use the boundary of the polygon, and remove all the nodes from the black mesh that fall within a distance of it equal to the minimum size of the size function used to generate the black mesh. Then use the remaining black mesh nodes to triangulate and get the final mesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant