function [lon,lat,dist,pres,temp,sal,dens,fluo]=load_MVPtransect(pathL2,transectname);

load([pathL2 filesep transectname '.mat'])

numprofs = length(data);
numbins = length(data(1).pres.value);

dist = zeros(numprofs,numbins);

lon = zeros(1,numprofs);
lat = zeros(1,numprofs);

pres = NaN(numprofs,numbins);
temp = NaN(numprofs,numbins);
sal  = NaN(numprofs,numbins);
dens = NaN(numprofs,numbins);
fluo = NaN(numprofs,numbins);

% extract all the data...
for iProf = 1:numprofs
    lon(iProf)  = metadata(iProf).lon.value;
    lat(iProf)  = metadata(iProf).lat.value;

    pres(iProf,:) = data(iProf).pres.value;
    temp(iProf,:) = data(iProf).temp.value;
    sal(iProf,:)  = data(iProf).psal.value;
    dens(iProf,:) = data(iProf).dens.value;
    fluo(iProf,:) = data(iProf).analog.value;

end


% Calculate the distance in km...
dist_vec = zeros(1,numprofs);
dist_vec(2:end) = m_idist(lon(1:end-1),lat(1:end-1),lon(2:end),lat(2:end))./1000;
dist_vec = cumsum(dist_vec);

for idum = 1:numprofs
    dist(idum,:) = dist_vec(idum);
end

