pro scan_type,dir wc = dir + '/*RAW*' rhi_dir = dir + '/RHI/' ppi_dir = dir + '/PPI/' spawn,'mkdir -p ' + rhi_dir spawn,'mkdir -p ' + ppi_dir files = file_search(wc,COUNT=nf) if(nf eq 0) then begin print,'No files found in ' + wc stop endif for i=0L,nf-1 do begin file = files[i] ; ; *** Load the data into a radar structure ; radar = rsl_anyformat_to_radar(file,/catch,/quiet,ERROR=error) if(ERROR) then begin flag = 'scan_type: bad file ' + file return,flag endif ; ; *** Check to see if a structure was returned. ; a = size(radar,/type) if(a ne 8) then begin flag = 'No structure returned: ' + file stop endif if(error) then begin print,'Error: ' + error endif ; ; *** Scan type ; stype = radar.h.scan_mode fileb = file_basename(file,'.gz') print,stype,fileb,format='(A-12,1x,A30)' if(stype eq 'RHI') then begin c = 'mv ' + file + ' ' + rhi_dir endif else begin c = 'mv ' + file + ' ' + ppi_dir endelse spawn,c endfor ; stop end