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'

No comments: