This toolbox is a further development of the BGC-Argo-Mat toolbox. It can be used for all types of Argo floats (Core, Deep, and BGC).
This toolbox contains a variety of functions for accessing, processing, and visualizing Argo data, including Core, Deep, and Biogeochemical Argo. Functions are designed to be maximally efficient, to provide access to the most up-to-date data available, and to allow for downloading and plotting of those data based on numerous user-defined conditions.
This sample code shows an example of selecting BGC floats that match geographic and temporal limits and visualizing some of the data.
This repository can be cloned using the command line or the GitHub Desktop application. The files can also be downloaded directly in zipped format.
Before use, make sure the files from this repository are placed in a directory that is in the MATLAB search path. Or add the directory where they are located to the search path (https://www.mathworks.com/help/matlab/matlab_env/add-remove-or-reorder-folders-on-the-search-path.html). Or run it in the directory where the Tutorial.m script was placed.
For an overview of how to use this toolbox, step through the Tutorial script (using the "Run and Advance" button of the MATLAB editor window), a tutorial that was developed for the 2021 GO-BGC Scientific Workshop (6/30/21). There are more scripts (listed under "Driver Scripts" below) to demonstrate particular features of this toolbox.
calc_mld.m : calculates mixed layer depth
data2table.m : converts the Data struct to a Matlab table
download_meta_files.m : downloads _meta.nc files from GDAC
download_snapshot.m : downloads an archived snapshot of Argo data
download_tech_files.m : downloads _tech.nc files from GDAC
download_traj_files.m : downloads _traj.nc files from GDAC
get_lon_lat_time.m : returns longitude, latitude, time for selected floats and profiles
initialize_argo.m : defines standard settings and paths and downloads synthetic profile index file
list_dacs.m : shows the Data Assembly Center(s) handling the specified floats
list_sensors.m : shows available sensors across fleet or for specified floats
load_float_data.m : loads data of one or more specified float(s) into memory
qc_filter.m : filters variables in a Data structure by QC flags
select_profiles.m : returns profiles and corresponding floats based on input criteria
show_maps.m : downloads float data and calls plot_profiles to create map plot(s)
show_profiles.m : downloads float data and calls plot_profiles to create profile plot(s)
show_sections.m : downloads float data and calls plot_sections to create section plot(s)
show_timeseries.m : downloads float data and calls plot_timeseries to create timeseries plot(s)
show_trajectories.m : downloads float data and calls plot_trajectories to create trajectory plot(s)
Use "help function_name" in the MATLAB command window to see a full description of input and output parameters for these functions.
calc_auxil.m : calculates various auxiliary variables from Argo float data
check_datenum.m : checks if input matches datenum format
check_dir.m : determines if a directory needs to be created and does so if necessary
check_existing_snapshot.m: checks if files for specified snapshot exist locally
check_float_variables.m : checks if specified variables are available for the specified floats
check_variables.m : checks if specified variables are available
combine_variables.m : creates a cell array with variables names (basic and extended sets)
create_tiled_layout.m : creates tiled layout in a profile plot with two different variables
delete_snapshot_prof.m : deletes individual profile files of a full snapshot file
depth_interp.m : interpolates values for Argo parameters against depth
do_download.m : determines if a file should be downloaded or not
determine_float_dacs.m : determines which DACs handle specified floats
determine_snaphot.m : determines which snapshot of Argo data will be used
do_pause.m : pauses execution of main_workshop (if used without desktop)
do_download.m : determines if a file needs to be downloaded
download_float.m : downloads the prof, Sprof or other NetCDF file for one float from the GDAC
download_index.m : downloads one index file from the GDAC
download_multi_floats.m : calls download_float to download NetCDF files from the GDAC for multiple floats
get_dims.m : returns number of profiles, parameters, and depth levels of one Sprof file
get_inpolygon.m : determines which of the given points are within the specified lon/lat limits
get_lon_lat_lims.m : obtains maximum/minimum latitude and longitude values from input data
get_multi_profile_mean.m : calculates the mean profile of multiple profiles
get_sensor_number.m : determines sensor name and number from input
get_var_name_units.m : returns the long variable name and units name for a given short parameter name input
initialize_meta.m : reads the meta index file and initializes the global Meta struct
initialize_prof.m : reads the prof index file and initializes the global Prof struct
initialize_sprof.m : reads the sprof index file and initializes the global Sprof struct
initialize_tech.m : reads the tech index file and initializes the global Tech struct
initialize_traj.m : reads the traj index file and initializes the global Traj struct
interp_lonlat.m : interpolates missing positions if possible
mod_xaxis_time.m : sets length and labels for x axis (time) in time series and section plots
plot_maps.m : plots horizontal maps
plot_one_profile.m : plots one profile
plot_profiles.m : plots profiles of one or more specified float(s) for the specified variable(s)
plot_sections.m : plots sections of one or more specified float(s) for the specified variable(s)
plot_timeseries.m : plots time series of one or more specified float(s)
plot_trajectories.m : plots trajectories of one or more specified float(s)
reorg_snapshot_files.m : reorganized snapshot files into GDAC-like directory tree
select_profiles_per_type.m : helper function of select_profiles that selects one type of floats
set_xlim.m : sets xlimits of current plot (if start/end dates were specified)
try_download.m : attempts to download a file from any of the specified GDACs
unzip_index_files.m : unzips index file in snapshot
Tutorial.m : tutorial script for GO-BGC Scientific Workshop (06/30/2021)
Comp_doxy_doxy2.m : shows use of multiple sensors in select_profiles, show_timeseries, show_profiles
Demo.mlx : live script version of the third example from Tutorial.m
Download_Snapshot_BGC_Bats.m : shows how to download a snapshot of Argo data
FAIR_Tutorial.m : tutorial script for FAIR Workshop (04/23/2025)
Show_deep_floats.m : shows use of 'depth' option for select_profiles, calls list_sensors
Show_doxy_rmode.m : shows use of 'mode' and 'min_num_prof' options for select_profiles
Show_missing_lonlat.m : shows interpolation of missing locations in select_profiles and show_trajectories
Show_oxygen_maps.m : shows creation of map plots (example: oxygen at depth)
Show_under_ice.m : shows marking of estimated positions in show_trajectories
Show_use_raw_no_strict.m : shows the use of the 'raw','no_strict' option
At least MATLAB R2016b (or any newer release) is needed to use these functions without modifications.
At least MATLAB R2019b is needed to overlay profiles of two different types of variables.
An Internet connection is needed to get the latest versions of index and profile files; but analysis and visualization functions can be run offline.
Memory requirements depend on the number of profiles and variables that are simultaneously loaded into memory.
Up to 10 GB local disk space is needed to store all Sprof files of BGC floats.
Up to 50 GB local disk space is needed to store all prof files of core and deep floats.
Downloading all Sprof files of BGC floats for the first time takes about 30 minutes with a fast Internet connection.
Downloading all prof files of core and deep floats for the first time will take at least four hours, even with a fast Internet connection.
Please feel free to use the GitHub Issues and Pull Requests features to report any problems with this code and to suggest bug fixes or additional features.
More detailed information about quality control flags, raw and adjusted modes, etc., can be found in H. C. Bittig et al., 2019. Front. Mar. Sci. https://doi.org/10.3389/fmars.2019.00502.
This toolbox has been translated to R:
R toolbox
A similar toolbox in Python (alpha version):
Python toolbox
Video tutorials for the toolbox
Please cite this toolbox as:
H. Frenzel, J. Sharp, A. Fassbender, N. Buzby, 2025. OneArgo-Mat: A MATLAB toolbox for accessing and visualizing Argo data. Zenodo. https://doi.org/10.5281/zenodo.6588041
This repository is a software product and is not official communication of the National Oceanic and Atmospheric Administration (NOAA), or the United States Department of Commerce (DOC). All NOAA GitHub project code is provided on an 'as is' basis and the user assumes responsibility for its use. Any claims against the DOC or DOC bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation, or favoring by the DOC. The DOC seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by the DOC or the United States Government.