Updated the minimisation function to use the maximum of the difference between the two sets of vertical distributions rather than the median difference. Also tidied up the debug function.
Updated the minimisation function to use the maximum of the difference between the two sets of vertical distributions rather than the median difference. Also tidied up the debug function.

pwcazenave/fvcom-toolbox,pwcazenave/fvcom-toolbox