Skip to content
Snippets Groups Projects
Commit 8b2c50e0 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Count long trajectories

parent 8f3058af
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ src_crs = ccrs.PlateCarree()
projection = ccrs.PlateCarree()
fig, ax = plt.subplots(subplot_kw = {"projection": projection})
random.seed(0)
n_long_traj = 0
for traj in trajectories:
duration = report_graph.node_to_date_eddy(traj[- 1], e_overestim,
......@@ -40,6 +41,7 @@ for traj in trajectories:
- report_graph.node_to_date_eddy(traj[0], e_overestim,
only_date = True)
if duration >= 120:
n_long_traj += 1
xy = []
for node in traj:
......@@ -63,6 +65,7 @@ for traj in trajectories:
ax.coastlines()
ax.gridlines(draw_labels = True)
print("Number of trajectories with sufficient duration:", n_long_traj)
if args.save:
plt.savefig(f"plot_traj.{args.save}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment