Skip to content

Commit

Permalink
Skip segments if no candidate edges are found
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Aug 3, 2020
1 parent e5de5ab commit 4eaa740
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conda_package/mpas_tools/viz/transects.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def find_transect_cells_and_weights(lonTransect, latTransect, dsTris, dsMesh,
uniqueIndices.update(indices)

n0IndicesCand = numpy.array(list(uniqueIndices))

if len(n0IndicesCand) == 0:
continue

trisCand = n0IndicesCand//nNodes
nextNodeIndex = numpy.mod(n0IndicesCand + 1, nNodes)
n1IndicesCand = nNodes * trisCand + nextNodeIndex
Expand Down

0 comments on commit 4eaa740

Please sign in to comment.