Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,4 @@ tags
.idea
.python-version
*.pt
examp.py
4 changes: 4 additions & 0 deletions src/weather_model_graphs/create/mesh/kinds/flat.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def create_flat_singlescale_mesh_graph(xy, mesh_node_distance: float):
"""
# Compute number of mesh nodes in x and y dimensions
range_x, range_y = np.ptp(xy, axis=0)
if mesh_node_distance <= 0:
raise ValueError(
f"mesh_node_distance must be greater than 0, got {mesh_node_distance}"
)
nx = int(range_x / mesh_node_distance)
ny = int(range_y / mesh_node_distance)

Expand Down