-
Notifications
You must be signed in to change notification settings - Fork 8
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
unexpected behavior for add_contour method #154
Comments
Hi, I think something has changed in matplotlib recently. Can you try using matplotlib version 3.5.2 and see if this resolves the issue or not? |
@felicio93 do you think this is related to #144? Have you had the chance to explore that other ticket? |
Thanks for the fast reply @SorooshMani-NOAA ..yes I saw this one other ticket but Im using matplotlib 3.5.1 so shouldnt be the issue. |
Another possibility is that when the base shape "cuts" the DEM it creates nan regions. I remember seeing something similar to what you see a couple of years ago when I was implementing this. I don't remember if I ever had a good solution, something like this might work: Try using the baseshape to create your geometry, but buffer the base shape before passing it to create hfun object. This way, the invalid contours due to cutting will fall outside the domain. Note that you need to play with the buffer size to get a good results with this approach. |
@SorooshMani-NOAA and @simonweppe, I agree with I don't think this is related to the matlab problem, at least it is not the same problem. I tried recreating 2 meshes using the same script I was using before (both cases worked). This is what I get now: @SorooshMani-NOAA, do you know if something has changed with our dependencies? |
FYI, the problem here is not the same of #144. I just tested and the ocsmesh "get_contour" raster function is working as expected. |
@felicio93 thanks for testing, I think the problem might then be what I described in #154 (comment) |
Thanks @SorooshMani-NOAA @felicio93 I will try your workaround |
Great - thanks for the quick replies and support on this. |
Can we close this ticket now? |
Yes you can, sorry I should have closed it back then - thanks for the help
on this!
…On Mon, 22 Jul 2024, 16:14 Felicio Cassalho, ***@***.***> wrote:
Closed #154 <#154> as
completed.
—
Reply to this email directly, view it on GitHub
<#154 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXQTUZYQQT7BVSH3SRUXYDZNUHV5AVCNFSM6AAAAABJGFZLSCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGYYDEMBVHAYDMNY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @SorooshMani-NOAA ,
Im running into a strange issue when using the
add_contour
method.I have defined a shape file that I want to use as my domain, and have tif file with bathy information from which I want to define my size function.
See code below:
Im getting a mesh that is looking good and as expected, expect near the outer ocean boundary where it's refined to size_mesh_min. This seems to be due to the
add_contour
step, which specifies a size of 100 along the outer edge of my mesh, while it should relax to much larger element size given it's deep through there. As if the computed -3 contour was going around the outer edge of my grid (it's not the case in the tiff).I've tried a few things and can get more relaxed resolution there using other approaches (e.g.
add_topo_bound_constraint
,add_subtidal_flow_limiter
), but as soon as I useadd_contour
, I get that odd high res zone.Am I missing something obvious ? See some snapshots below.
The text was updated successfully, but these errors were encountered: