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

All transects #369

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reads in mesh_2d variable names
browniea committed Dec 19, 2024
commit 717dcb860ebca8d406e7d6aad5c8d2d5a075ff89
10 changes: 9 additions & 1 deletion mhkit/river/io/d3d.py
Original file line number Diff line number Diff line change
@@ -221,6 +221,10 @@ def get_layer_data(data, variable, layer_index=-1, time_index=-1, to_pandas=True
"name": "mesh2d_nLayers",
"coords": data.variables["mesh2d_layer_sigma"][:],
},
"mesh2d_face_x mesh2d_face_y mesh2d_layer_sigma": {
"name": "mesh2d_nLayers",
"coords": data.variables["mesh2d_layer_sigma"][:],
},
"mesh2d_edge_x mesh2d_edge_y": {
"name": "mesh2d_nInterfaces",
"coords": data.variables["mesh2d_interface_sigma"][:],
@@ -230,7 +234,7 @@ def get_layer_data(data, variable, layer_index=-1, time_index=-1, to_pandas=True
data.variables["mesh2d_waterdepth"][time_index, :], False
)
waterlevel = np.ma.getdata(data.variables["mesh2d_s1"][time_index, :], False)
coords = str(data.variables["waterdepth"].coordinates).split()
coords = str(data.variables["mesh2d_waterdepth"].coordinates).split()

elif str(data.variables[variable].coordinates) == "FlowElem_xcc FlowElem_ycc":
cords_to_layers = {
@@ -601,6 +605,10 @@ def get_all_data_points(data, variable, time_index=-1, to_pandas=True):
"name": "mesh2d_nLayers",
"coords": data.variables["mesh2d_layer_sigma"][:],
},
"mesh2d_face_x mesh2d_face_y mesh2d_layer_sigma": {
"name": "mesh2d_nLayers",
"coords": data.variables["mesh2d_layer_sigma"][:],
},
"mesh2d_edge_x mesh2d_edge_y": {
"name": "mesh2d_nInterfaces",
"coords": data.variables["mesh2d_interface_sigma"][:],