OMS data to be (x,y) rather than (y,x)</span>
0133     pctemp2 = pctemp3(:, :, j)';
0134     pcsalt2 = pcsalt3(:, :, j)';
0135     pcdepth2 = squeeze(pc.depth.data(:, :, j))';
0136     
0137     <span class="comment">% Reshape the arrays to allow the sort to work properly later</span>
0138     tlon=reshape(plon,(size(plon,1)*size(plon,2)),1);
0139     tlat=reshape(plat,(size(plat,1)*size(plat,2)),1);
0140     pctemp2 = reshape(pctemp2,(size(pctemp2,1)*size(pctemp2,2)),1);
0141     pcsalt2 = reshape(pcsalt2,