% I've extracted the velocity fields from the inverse model, % along with some accompanying fields. The output is saved % for each hydrographic section, with the file name % velfields_(sectionname).mat. % Each file contains: % lon, lat: longitude and latitude (horizontal coordinates) % p, z: pressure (dbar) and depth (m) (vertical coordinates) % sal, temp: salinity (psu) and in-situ temperature (deg.C) % ugeo, uek: geostrophic and Ekman velocity (m/s). % Sign convention for velocity: if you're at lat(1),lon(1) % and looking at lat(length(lat)),lon(length(lon)), % then positive is to your left. (I had to come up with a % more generic convention than "positive northward" because % of the arbitrary orientation of the sections.) % Total velocity is uek+ugeo. Each velocity is for a station % pair, so ugeo(1) is between the pair lon(1) and lon(2). % Note that the Ekman transports are actually calculated from % monthly climatology, not from the hydrographic section. % I've converted the Ekman mass transport to Ekman velocities % assuming that they extend to a depth of 20m - totally % arbitrary. % Area: a matrix containing the area (m^2) of each bin. % This is NOT just the lateral distance times diff(z), for % bins beneath the deepest common depth of a station pair, % but rather the area of the bottom triangle in that bin. % You can calculate the mass transport as Area.*(ugeo+uek).