function [wi,jd]=mergescal(cdflist,uname,start,stop,dt);
%function [u,jd]=mergescal(cdflist,uname,start,stop,dt);
%dt in seconds
jd0=julian(start);
jd1=julian(stop);
% number of points
npts=((jd1-jd0)/(dt/3600/24))+1;
jdi=0:npts-1;
jdi=jdi*dt;     %time in seconds from start
wi=jdi*NaN;

[m,n]=size(cdflist);
for icdf=1:m,
  cdf=cdflist(icdf,:);
  ind=min(find(cdf==' '));
  if(length(ind)>0),
    cdf=cdf(1:ind-1);
  end
  [w,jd]=getts(cdf,uname,start,stop);
  if(isempty(w)==0),
% convert to seconds from start
    jd=(jd-jd0)*24*3600;
    w=interp(jd,w,jdi);
    ind=find(~isnan(w));
    wi(ind)=w(ind);
  end
end
wi=wi(:);
jd=jd0+jdi/3600/24;
