correct way to calculate transport through a section in an ocean numerical model Suppose that I want to calculate the transport across a certain transect (green line) from the outputs of an ocean numerical model. The model has the $u$ values at the center of the grids (crosses) and the $v$ values at the corners (circles), as it uses a C-grid.



Should I use the velocity values closest to the transect? Should I average the values at the corners? Interpolate?

Side question: does anyone know some Matlab toolbox to analyze numerical model outputs?
I have been using the routines in nctoolbox (also check here) that do all the slicing (vertical, horizontal, following a track).
The repository is in GitHub.

The one you should looking at is vsliceg.m.

You can follow the logic there or develop your own.