Saturday, February 7, 2015

Match airs data granules in a folder

the reverb search came short. But I had the list of c05 data. That meant I could mimic the site/doy and have the wget -nc -i to the list.
asdf = importdata('\\taal\collectionsin\primary\airsc6\2003\c52003.txt')
 fid = fopen(['\\taal\dai\download2\missed3.txt'] , 'w') ;

for jj = 1:length(asdf)-4
gettxt = asdf{jj} ;

if length(gettxt)<57 & length(gettxt)>10
%get the day of the year for 2003 $$$$$
doy = datenum([str2num(gettxt(6:9)),str2num(gettxt(11:12)),str2num(gettxt(14:15))])  - datenum(2003,1,1) + 1;

ftploc = ['ftp://site/2003/', sprintf('%03d',doy), '/', gettxt(1:23),'*.hdf'];
% doy = datenum([2005,2,31]) - datenum(2005,1,1) + 1
fprintf(fid,'%s\n',ftploc);
end   
end
% newwget1 = newwget1';
fclose(fid) ;
 'done! now copy to the place and happy wget!'


No comments: