Skip to content

Commit

Permalink
Merge branch '569-bumping-meshkernel-version-to-latest-v300' of https…
Browse files Browse the repository at this point in the history
…://github.com/Deltares/HYDROLIB-core into 569-bumping-meshkernel-version-to-latest-v300
  • Loading branch information
veenstrajelmer committed Oct 30, 2023
2 parents b5e0041 + 449ff35 commit e607ba7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hydrolib/core/dflowfm/net/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def read_mesh2d(self, mesh2d: Mesh2d) -> None:
# Read mesh1d
for meshkey, nckey in self._explorer.mesh2d_var_name_mapping.items():
setattr(mesh2d, meshkey, self._read_nc_attribute(ds[nckey]))
#TODO: replace with xugrid reader
mesh2d._set_mesh2d() #TODO: we still require this here to sync new attrs with meshkernel instance
# TODO: replace with xugrid reader

mesh2d._set_mesh2d() # TODO: we still require this here to sync new attrs with meshkernel instance

ds.close()

Expand Down
8 changes: 4 additions & 4 deletions tests/dflowfm/test_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def test_create_refine_2d():
# check fnc
fnc = mesh2d.mesh2d_face_nodes
assert fnc.shape == (100, 4)
assert (fnc == -2147483648).sum() == 12 # amount of triangles
assert (fnc == -2147483648).sum() == 12 # amount of triangles

# TODO: remove plotting
# _, ax = plt.subplots()
# mesh2d_output = mesh2d.get_mesh2d()
Expand Down Expand Up @@ -433,12 +433,12 @@ def test_read_net_nc_2d_without_faces(self):
assert len(network._mesh2d.mesh2d_face_y) == 0
assert len(network._mesh2d.mesh2d_face_z) == 0
assert network._mesh2d.mesh2d_face_nodes.shape == (0, 0)

assert len(network._mesh2d.mesh2d_node_x) == 238
assert len(network._mesh2d.mesh2d_node_x) == 238

assert len(network._mesh2d.mesh2d_edge_nodes) == 445

# test whether meshkernel instance and hydrolib mesh2d instance are consistent
nnodes_internal = network._mesh2d.mesh2d_node_x.size
nnodes_mk = network._mesh2d.get_mesh2d().node_x.size
Expand Down

0 comments on commit e607ba7

Please sign in to comment.