; Procedure to plot SLODAR results ; Input: month and date of the evening pro plotprof, mm, dd, altmax restore, 'slodar.idl' ; slodat structure: ; prof = { UTyear: 0, UTmonth: 0, UTday: 0, UT: 0.0, $ ; r0: 0.0, alt:FLTARR(9), Intcn2:FLTARR(9) } ; wrong (evening) dates in the CN2 files! eve = where((slodat.UTmonth eq mm) and (slodat.UTday eq dd) ) morn = -1 nmorn = 0 ; Correct UT dates ;eve = where((slodat.UTmonth eq mm) and (slodat.UTday eq dd) and (slodat.UThour gt 12) ) ;dd1 = dd+1 & mm1 = mm ;if (dd1 gt 30) then begin dd1=1 & mm1=mm+1 & endif ;morn = where((slodat.UTmonth eq mm1) and (slodat.UTday eq dd1) and (slodat.UThour lt 12) ) neve = n_elements(eve) nmorn = n_elements(morn) nprof = neve + nmorn if (nprof eq 0) then return prof = slodat[0] out = replicate(prof,nprof) out(0:neve-1) = slodat(eve) ;out(neve:nprof-1) = slodat(morn) ut = fltarr(nprof) for i=0,nprof-1 do ut[i] = out[i].UT print, 'Total profiles found: ', nprof print, 'UT range: ',ut[0], ut[nprof-1] nalt = 8 tmp = fltarr(nprof,nalt) for i=0,nprof-1 do tmp(i,*) = out[i].intcn2(0:nalt-1) nut = 450 utmin = 21. +3.-24. utmax = 6.0 + 3. utstep = (utmax-utmin)/nut utgrid = findgen(nut)*utstep + utmin ntick = floor(utmax-utmin) jtick = fix( (findgen(ntick))/utstep) index = fltarr(nut) for j=0,nut-1 do begin dt = abs(utgrid[j]-ut[0]) index[j]=0 for i=1,nprof-1 do if (abs(utgrid[j]-ut[i]) lt dt) then begin dt = abs(utgrid[j]-ut[i]) index[j] = i endif if (dt gt 0.1) then index[j] = -1 endfor nalt = 200 ; rebin altitude grid ; altmax = 12000. altmin = 0. altstep = (altmax- altmin)/nalt realt = findgen(nalt)*altstep + altmin tmp = fltarr(nut,nalt) for j=0,nut-1 do begin jj = index[j] if (jj ge 0) then begin dh = out[jj].alt[1] - out[jj].alt[0] for i=0,7 do begin alt = (out[jj].alt)[i] sel = where( (realt ge alt - 0.5*dh) and (realt le alt + 0.5*dh)) if (sel[0] ge 0) then tmp[j,sel]= (out[jj].intcn2)[i] > 0. endfor endif endfor scale = max(tmp) tmp = tmp/scale scale = 1. for j=0,ntick-1 do tmp(jtick[j],nalt-3:nalt-1)= scale for j=0,ntick-1 do tmp(jtick[j],0:2)= scale tmp(*,nalt/2) = scale ; tmp2 = congrid(tmp, nut,400) ;device, decomposed=0 ; to get the colors on X-display! ;loadct, 3 ; heat ; loadct, 4 ; BLUE/GREEN/RED/YELLOW ; tvscl, 1. - tmp tvscl, 1. - sqrt(tmp) ; tvscl, congrid(tmp,400, 400, /interp) ; tvscl, sqrt(congrid(tmp,nut, 400)) ; device, filename='---',/color , bits=8 ; to get color plots. ;stop end