This directory contains scripts written by Jake Gebbie for diagnosing subduction rates. All scripts are for offline diagnostics in MATLAB. Eulerian maps of subduction: diag_sann.m: Diagnose the annual subduction rate. diag_induction.m: Diagnose lateral induction across a surface (usually the mixed-layer base) get_mldvel.m: Interpolate the velocity field to a surface (usually the mixed-layer base) Water-mass diagnostics: To be included at a future date. Utilities: mldepth.m: Calculate mixed-layer depth from the density field. cshift.m: A MATLAB replica of the popular Fortran function. integrate_for_w.m: A MATLAB rendition of the MITgcm subroutine of the same name.