pro read_eva,scan,yr,doy,hr,min,r,wav @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; READ_EVA ; PURPOSE: ; Read SYNOP scans from Evans facility ; CALLING SEQUENCE: ; read_eva, scan, yr,doy,hr,mi,r,wav ; INPUTS: ; files X$AUX:SCAN.EVA and X$AUX:HEADER.EVA ; (copies of these files are located in the library X$LIB:AUX.ARC) ; OUTPUTS: ; scan 2D array with scan data, dimension (*,120) ; yr,doy,hr,min ; time of observation ; r scan height (1.15,1.25,1.35,1.45) ; wav wavelength ('red' or 'green') ; CALLS: ; flt_read ; PROCEDURE: ; MODIFICATION HISTORY: ; APR-1995, Paul Hick (UCSD) ;- ; SCAN.EVA stores each 360 deg scan in 10 records (9*13+3=120 numbers) nr = 10 ; # records per scan nx0 = 13 ; # numbers per records nx1 = 3 ; # numbers on 10th (incomplete) record stat = flt_read( filepath(root=getenv('SYS'),'eva_scan.txt'),scan,nx=nx0,/silent) ; Read the scans as = size(scan) nx0 = as(1) & ny0 = as(2) nx = nx0*nr & ny = ny0/nr scan = reform(scan, nx, ny) ; Reform the scan data to (*,120) array scan = scan(0:nx-1-(nx0-nx1),*) ; Remove the trailing 10 zero's stat = flt_read( filepath(root=getenv('SYS'),h,'eva_header.txt'),/silent) ; Read scan header file yr = fix(reform(1900+h(4,*))) doy = fix(reform(h(0,*))) hr = fix(reform(h(2,*))) min = fix(reform(h(3,*))) r = reform(h(1,*)) ; Scan height w = fix(reform(h(9,*))) ; Wavelength if (where(w ne 5303 and w ne 6374))(0) ne -1 then message, 'funny wavelengths' wav = replicate('red',n_elements(w)) ; w=6374 is red wav(where(w eq 5303)) = 'green' ; w=5303 is green return & end