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

Feature/set boundaries in global mesh #3

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

SanderHulst
Copy link
Owner

I'm running ADCIRC on a global mesh that was generated with OceanMesh2D. They have no boundary information which is apparently acceptable for ADCIRC. It is a problem when I regrid the unstructured results to a regular mesh because there is no notion about what is land or sea.

The biggest problem to work around was that the class Hull appears to have problems with the cyclic grid

mesh.hull.rings.exterior() fails. I did not investigate why.

I worked around the problem by:

  • using get_boundary_segments to get all coastal and interior boundaries
  • fixing any issues with wrapped continental boundaries (eurasia and antartica)
  • assign boundary code 0 on segments longer than 350 (degrees I think that is) and 1 to the rest
  • create a new Boundaries instance
  • create a new Mesh instance with the original jigsaw mesh and new boundaries object
  • write it

One of the first I would like to is to be able to modify the global mesh. For instance, it has Lake Ijsselmeer in the Netherlands as open water and that is not correct.

It would be interesting to see if we can get OCSMesh as far as to be able to create a new mesh, based on an existing global mesh.

return segments


def get_boundary_data(mesh):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SanderHulst can you please explain if and how does this get_boundary_data function differ from the existing functionality in mesh/mesh.py?

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