; Procedure to plot SODAR results ; Input: month and date of the evening pro plotprof, mm, dd restore, 'sodar.idl' eve = where((spdat.UTmonth eq mm) and (spdat.UTday eq dd) and (spdat.UThour gt 12) ) dd1 = dd+1 & mm1 = mm if (dd1 gt 31) then begin dd1=1 & mm1=mm+1 & endif morn = where((spdat.UTmonth eq mm1) and (spdat.UTday eq dd1) and (spdat.UThour lt 12) ) neve = n_elements(eve) nmorn = n_elements(morn) nprof = neve + nmorn if (nprof eq 0) then return ; prof = { UTyear: 0, UTmonth: 0, UTday: 0, UThour:0.0, UTmin:0.0, $ ; nlevels:40, alt:FLTARR(40), ct2:FLTARR(40) } prof = spdat[0] out = replicate(prof,nprof) out(0:neve-1) = spdat(eve) out(neve:nprof-1) = spdat(morn) ; nalt = n_elements(out[0].ct2) nalt = 40 ut = fltarr(nprof) for i=0,nprof-1 do ut[i] = out[i].UThour+out[i].UTmin/60. ut(0:neve-1) = ut(0:neve-1)-24. print, 'Total profiles found: ', nprof print, 'UT range: ',ut[0], ut[nprof-1] tmp = fltarr(nprof,nalt) for i=0,nprof-1 do tmp(i,1:nalt-1) = out[i].ct2 nut = 480 utmin = 20.5 - 24. utmax = 7.00 utstep = (utmax-utmin)/nut utgrid = findgen(nut)*utstep + utmin ntick = floor(utmax-utmin) jtick = fix( (findgen(ntick)+0.5)/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 endfor tmp = fltarr(nut,nalt) for j=0,nut-1 do tmp[j,1:nalt-1]= out[index[j]].ct2 scale = max(tmp) for j=0,ntick-1 do tmp(jtick[j],nalt-3:nalt-1)= scale for j=0,ntick-1 do tmp(jtick[j],0:1)= scale tmp2 = congrid(tmp, nut,400) tmp2(*,100) = scale & tmp2(*,200) = scale ; & tmp2(*,300) = scale ;device, decomposed=0 ; to get the colors on X-display! ; loadct, 3 ; heat ; loadct, 4 ; BLUE/GREEN/RED/YELLOW tvscl, sqrt(tmp2) ; tvscl, congrid(tmp,400, 400, /interp) ; tvscl, sqrt(congrid(tmp,nut, 400)) ; device, filename='---',/color to get color plots. ;stop end