coecms / frontdetection

Apache License 2.0
2 stars 2 forks source link

Add graph-based linejoin #10

Open ScottWales opened 3 years ago

ScottWales commented 3 years ago

Version of linejoin using Scipy's graph tools to find paths.

Creates a graph of the input points weighted by distance, then find minimum spanning subtrees of that graph

ScottWales commented 3 years ago

Comparison of linejoin_graph (black dots) vs. linejoin (red lines). Smooth fronts are pretty much the same, there are differences in squiggly fronts (possibly these are marginal detections?)

comparison

linejoin_graph completed in ~ 200 ms, linejoin in 1 min 25 s for a 500x500 subset of ERA5.

ScottWales commented 3 years ago

Possible enhancements