Code for calculating the total mass flux from size-fractionated particle data written and organized by Y. Xiang (UCSC, UW) for the GBC paper (DOI: 10.1029/2021GB007292) contact info: yaxiang@uw.edu or yaxiang@ucsc.edu 03/30/2022 - Files/codes needed to successfully run this code (Xiang_GBC_mass_flux_sinking_rates.m) 1. Make input file using certain formats (see Raw_data_template.csv or the code for more details) 2. Download the Thermodynamic Equation Of Seawater-2010 (TEOS-10) toolbox (GSW v3.06-MATLAB) to calculate hydrography (https://www.teos-10.org/software.htm) 3. Download codes for calculating the coefficient and exponent of mass-size spectra from A. Burd. See https://github.com/BurdLab/size-spectra-fit for more details. Download and make sure TestFunc1.m, TestFunc2.m, and CleanModelResults.m are in the directory. YX simplified the CleanModelResults.m and named it CleanModelResults_2.m and this needs to be downloaded from the Zenodo to run the code. - A test run can be done with the input file "Xiang_2022_GBC_raw_data_20220330.csv" and the final results will be generated as " Xiang_2022_GBC_processed_data_mass_flux_WSV_MC_20220330.csv" - Warning: the calculation of the coefficient and exponent of mass-size spectra is quite slow and please be patient especially with a large dataset. - Please cite the paper and code if you are using the code. 1. Xiang, Y., Lam, P. J., Burd, A. B., & Hayes, C. T. (2022). Estimating mass flux from size-fractionated filtered particles:Insights into controls on sinking velocities and mass fluxes in recent U.S. GEOTRACES cruises. Global Biogeochemical Cycles, 36, e2021GB007292. https://doi.org/10.1029/2021GB007292 2. Code- DOI: 10.5281/zenodo.6426353