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

Subsetting Issue #145

Open
felicio93 opened this issue Apr 10, 2024 · 1 comment
Open

Subsetting Issue #145

felicio93 opened this issue Apr 10, 2024 · 1 comment

Comments

@felicio93
Copy link
Collaborator

I am trying to substitute an area of a coarse mesh with a high resolution mesh (please see below the lowres domain, with the highres mesh within it).
subset_debug_01

here is the code I am running to combine these meshes:
subset_debug_02

To debug I added multiple save points on subset_n_combine.py to save the shapefiles created.

I am attaching the jupyter notebook I created, the subset__n_combine.py (with the modifications I mentioned above), all the inputs for running subset_n_combine, and the saved shapefile polygons.

~if you want to run the jupyter notebook, start from the Subset section and change the paths to the files I am providing.

Files:

Issue_Subset.zip

@felicio93
Copy link
Collaborator Author

I think I was able to identify the problem with adding the high resolution mesh over the low resolution.

After reviewing the subset_n_combine.py code I believe I understand what it was trying to do.

In essence I think this is what happened, in the original example this was the setup:
Image

So, the buffer area covers nodes on both the high and low res meshes.

In my case, this was the setup:
Image

With this setup, the buffer area only covers nodes in the low res mesh.

The code removes (area of interest+buffer) from the low res mesh, and then recomputes the nodes within the buffer area based on the high res mesh, correct? The problem was that in my case there was no high res mesh within the buffer area, and that is why my final mesh was lowres mesh - (area of interest+buffer):
Image

The solution I gave was to create an area of interest that was equal the area of interest used to create the high res mesh + a shift to the East, so when the buffer is created it gets nodes from both meshes:
Image

My final mesh looks good now:
Image

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

No branches or pull requests

1 participant