We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When clipping a netcdf over a geometrylist the mesh2d_node_x, mesh2d_node_y are clipped, but mesh2d_node_z isn't
mesh2d_node_x
mesh2d_node_y
mesh2d_node_z
To Reproduce Steps to reproduce the behavior:
from pathlib import Path import numpy as np from meshkernel import GeometryList import meshkernel as mk from hydrolib.core.dflowfm.net.models import Network nc_path = Path(__file__).parent / "ovd-j98_6-v1a_net.nc" # read mesh using hydrolib-core network = Network.from_file(Path(nc_path)) mesh2d = network._mesh2d # show node x/y/z print("before") print(f"x: {mesh2d.mesh2d_node_x.shape}") print(f"y: {mesh2d.mesh2d_node_y.shape}") print(f"z: {mesh2d.mesh2d_node_z.shape}") # define gometrylist x_coordinates = np.array( [219032.36821211, 219415.05146748, 236135.84080332, 257422.06085974, 257935.46607711, 221483.69564399, 219032.36821211], dtype=np.double) y_coordinates = np.array( [502669.83347292, 504635.40577414, 520870.43426807, 522115.73282761, 511205.87195854, 495803.7154375, 502669.83347292], dtype=np.double) geometrylist = GeometryList(x_coordinates, y_coordinates) # clip mesh mesh2d.meshkernel.mesh2d_delete( geometry_list=geometrylist, delete_option=mk.DeleteMeshOption.INSIDE_NOT_INTERSECTED, invert_deletion=True, ) # show_result print("after") print(f"x: {mesh2d.mesh2d_node_x.shape}") print(f"y: {mesh2d.mesh2d_node_y.shape}") print(f"z: {mesh2d.mesh2d_node_z.shape}")
mesh_node2d_x
mesh_node2d_y
mesh_node2d_z
mesh2d_delete
Expected behavior A length of mesh2d_node_z of 226161 as are mesh2d_node_x and mesh2d_node_y.
Screenshots We do think deletion of x and y is as expected. Running network.plot() after executing the script above gives a plausible result:
network.plot()
Version info (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When clipping a netcdf over a geometrylist the
mesh2d_node_x
,mesh2d_node_y
are clipped, butmesh2d_node_z
isn'tTo Reproduce
Steps to reproduce the behavior:
mesh_node2d_x
,mesh_node2d_y
andmesh_node2d_z
before and aftermesh2d_delete
:Expected behavior
A length of
mesh2d_node_z
of 226161 as aremesh2d_node_x
andmesh2d_node_y
.Screenshots
We do think deletion of x and y is as expected. Running
network.plot()
after executing the script above gives a plausible result:Version info (please complete the following information):
The text was updated successfully, but these errors were encountered: