<jupyter_start><jupyter_text>Write a netCDF file containing the profiler measurements using the list of `mat` files.      ⚠️ Not useful for the plotting but kept for the record.<jupyter_code>import alborexdata
import netCDF4
import glob
import os
import matplotlib.pyplot as plt
from importlib import reload
datadir = "/home/ctroupin/Data/Alborex/Profilers/0000000/"
datafilelist = sorted(glob.glob(os.path.join(datadir, "*mat")))
lon, lat, t, p, T, S = alborexdata.Profiler.read_profiles_from_list(datafilelist) 
outputdir = "../data/"
outputfile = os.path.join(outputdir, 
                          "dep0001_profiler-drifter-arvorc_socib_arvorc_L0_2014-05-25.nc")

if os.path.exists(outputfile):
    os.remove(outputfile)
alborexdata.Profiler.arrays_to_netcdf(outputfile, lon, lat, t, p, T, S)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10787878787878788, 'fraction_numerical': 0.025454545454545455, 'mean_word_length': 4.858156028368795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '28894', 'license': 'MIT', 'n_tokens_mistral': 317, 'n_tokens_neox': 302, 'n_words': 67, 'path': 'python/profilers_mat2netCDF.ipynb', 'repo_name': 'ctroupin/AlborEx-Data', 'size': '825'}