pro plot_temps,ps=ps ; ; bf 7/28/03: ; Read and plot Rayleigh temperatures received from Vince Wickwar. ; (original file received was MS office doc. This was opened with ; Windows and saved as a text file, which is read here). ; ; Open file and read 1-line header: ; openr,lurd,'Rayleigh_Temps.dat',/get_lun header = '' readf,lurd,header ; ; Determine number of data records, nrec: ; line = '' nrec = 0 while not eof(lurd) do begin readf,lurd,line nrec = nrec+1 endwhile print,'nrec=',nrec ; ; Make data arrays, and read from file: ; alt = fltarr(nrec) temps = fltarr(nrec,12) temps12 = fltarr(12) ; point_lun,lurd,0 readf,lurd,header for i=0,nrec-1 do begin readf,lurd,altrd,temps12 alt[i] = altrd temps[i,*] = temps12[*] ; print,format="('i=',i5,' alt=',f5.1,' temps=',12f6.1)",i,alt[i],temps[i,*] endfor free_lun,lurd ; ; Set up for ps if requested: ; if keyword_set(ps) then begin set_plot,'ps' endif ; ; Panel individual month plots: ; !p.multi = [0,3,4,1,0] for i=0,11 do begin title='Rayleigh Temperatures for month '+string(format="(i2)",i+1) plot,temps[*,i],alt,yrange=[40.,95.],xrange=[150.,280.],xstyle=1,ystyle=1,$ title=title,ytitle='Altitude (KM)',xtitle='Temperature (deg K)' endfor ; ; Contour with months on x-axis, altitude on y-axis: ; if not keyword_set(ps) then cursor,x,y,/down !p.multi = [0,0,0,0,0] temps = transpose(temps) months = indgen(12)+1 print,'Temps min,max=',min(temps),max(temps) print,'Altitude min,max=',min(alt),max(alt) levels = fltarr(12) levels[0] = 160. for i=1,11 do levels[i] = levels[i-1]+10. contour,temps,months,alt,/follow,levels=levels,$ title="Rayleigh Temperature (deg K) (Wickwar)",$ xstyle=1,xrange=[1,12],xtitle="MONTH",$ ystyle=1,yrange=[min(alt),max(alt)],ytitle="ALTITUDE (KM)" ; if keyword_set(ps) then begin device,/close print,'Made file idl.ps' endif end