<jupyter_start><jupyter_text>Plot the velocity with respect to the distance to the front.<jupyter_code>import alborexdata
import alborexpaths
import netCDF4
import os
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap 
import numpy as np
import datetime
import cmocean
from geopy.distance import vincenty
from importlib import reload
f = alborexdata.Front()
f.get_from_file(alborexpaths.frontfile)
f.smooth()<jupyter_output><empty_output><jupyter_text>Make the plot<jupyter_code>nfiles = len(alborexpaths.drifterfiles)
ii = 0
plt.figure()
for drifterfile in alborexpaths.drifterfiles:
    ii += 1
    print(str(ii) + "/" + str(nfiles))
    d = alborexdata.Drifter()
    d.get_from_netcdf(drifterfile)
    # Apply quality flags
    d.apply_qc_latlon(QC=[1])
    # Select mission period
    d.select_dates(finaldate=datetime.datetime(2014, 6, 1, 0, 0))
    d.get_distance_front(f.lon, f.lat)
    d.compute_velocity(velmax=5.)
    plt.plot(d.distance2front[:-1], d.velocity, "k.")
plt.xlim(0, 50000)
plt.show()
plt.close()<jupyter_output>1/25
2/25
3/25
4/25
5/25
{'fraction_non_alphanumeric': 0.11100832562442182, 'fraction_numerical': 0.03330249768732655, 'mean_word_length': 5.044692737430168, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '445012', 'license': 'MIT', 'n_tokens_mistral': 455, 'n_tokens_neox': 417, 'n_words': 89, 'path': 'python/plot_velocity_distance_to_front.ipynb', 'repo_name': 'ctroupin/AlborEx-Data', 'size': '1081'}