bFile = 'timecheckb.cdf'; b1 = 1; b2 = 10; p1 = 1; p2 = 15; cdf = netcdf(bFile); t = cdf{'time'}(b1:b2,:); [nb, np] = size(t); t2 = cdf{'time2'}(b1:b2,:); pnum = cdf{'profile'}(b1:b2,:); bnum = cdf{'burst'}(b1:b2); tj = t+t2/(24*3600*1000); tm = datenum(gregorian(tj)); tm = reshape(tm,nb,np); %compute hundredths % Burstdata.Time(profile) = julian([ProfileHdr.ProfileTime(1:3) 0 0 0]); % julian day % Burstdata.Time2(profile) = ... % milliseconds in the julian day % ProfileHdr.ProfileTime(4).*(3600*1000)+... % hours to milliseconds % ProfileHdr.ProfileTime(5).*(60*1000)+... % minutes to milliseconds % ProfileHdr.ProfileTime(6).*(1000)+... % seconds to milliseconds % ProfileHdr.ProfileTime(7).*10; % hundredths of seconds to milliseconds h = t2./(3600*1000); m = (h - floor(h)).*60; s = (m-floor(m)).*60; hs = (s-floor(s)).*100; dhs = diff(hs,1,1); plot(dhs') disp(sprintf('Checking %s from profiles %d to %d',... bFile,pnum(1,1),pnum(end,end))) % disp(sprintf('ProfileInterval = %d',cdf.ProfileInterval(1))) % dt = mean(dtj); % disp(sprintf('Mean diff tj = %6.4f sec',dt)) % stdt = std(dtj); % disp(sprintf('STD diff tj = %6.4f sec',stdt)) close(cdf) if 1, for ib = b1:b2, for ip = p1:p2, disp(sprintf('%s %2.0f hs profile %d in burst %d',... datestr(tm(ib,ip)),hs(ib,ip),pnum(ib,ip),bnum(ib))) end end end