Showing posts with label download. Show all posts
Showing posts with label download. Show all posts

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!'


Thursday, February 5, 2015

Get C06 from C05 convention

A quick way to find collection 6 files when you have the c05 download script files


asdf2 = importdata('wget-2004.txt');

want = round(linspace( 1,length(asdf2)+1,20));
 
for jj = 1:length(want)-1
    fprintf( '%d - %d\n',  [want(jj) want(jj+1)-1])
% end
  
 fid = fopen(['\\taal\dai\download2\',num2str(jj) ,'get.txt'] , 'w') ;

for kk= want(jj):want(jj+1)-1 %3001:7521%length(asdf)
    try
    newg{kk} = [asdf2{kk}(1:103),'*.hdf'];
         fprintf(fid,'%s\n', newg{kk});
    catch
        continue
    end
    end
% newwget1 = newwget1';
     fclose(fid) ;
end

clear all
asdf = importdata('\\taal\c\primary\airs\2005\wget-file-2005q3');
for jj = 2%:length(want)-1
 
 fid = fopen(['\\taal\dai\download2\',num2str(jj) ,'.txt'] , 'w') ;
for kk= 1:length(asdf) % want(jj):want(jj+1)-1 %
    try
    newg{kk} = [asdf{kk}(1:103),'*.hdf'];
         fprintf(fid,'%s\n', newg{kk});
    catch
        continue
    end
end
% newwget1 = newwget1';
     fclose(fid) ;
end
'done! now replace 2005 with 2006'