; Procedure to compare SLODAR and SODAR profiles ; Input: month and date of the evening ; Jan 15, 2005: new sodar data, use selsod.pro ;------------------------------------------------- pro slosod, mm, dd ; slodar data selection restore, 'slodar.idl' ; ---------slodar 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) nslo = neve + nmorn if (nslo eq 0) then return prof = slodat[0] out = replicate(prof,nslo) out(0:neve-1) = slodat(eve) ;out(neve:nslo-1) = slodat(morn) utslo = fltarr(nslo) for i=0,nslo-1 do utslo[i] = out[i].UT print, 'Total SLODAR profiles found: ', nslo print, 'UT range: ',utslo[0], utslo[nslo-1] nalt = 8 tmp = fltarr(nslo,nalt) for i=0,nslo-1 do tmp(i,*) = out[i].intcn2(0:nalt-1) ; -------------------- SODAR data selection sod = selsod(mm, dd) nsod = n_elements(sod) utsod = sod.uthour - 1. print, 'Total SODAR profiles found: ', nsod print, 'UT range: ',utsod[0], utsod[nsod-1] ;---------------------------------------------------- ; Data analysis ;------------------------------------------------------- ; Make running plot nrun = -1 !p.charsize = 1.5 !x.style=1 plot, [0], [0], xtitle='Altitude, m', ytitle='Integral, 10!U-13!N m!U1/3',xr=[0,1200],yr=[0,25] ; outer loop on SODAR profile for nn=0,nsod-1 do begin ; select the Sodar profile number nn ut = utsod[nn] sodprof = sod[nn].cn2*1e13 ; in 1e-13 m^1/3 units sodalt = sod[nn].alt sel = where( (utslo ge ut - 1./3.) and (utslo le ut) ) if (sel[0] lt 0) then begin ; print, 'No SLODAR matching data! Exiting...' continue endif ; Average the slodar profiles (wide binary) over 20-min. SODAR integration time sloalt = fltarr(8) & sloprof = fltarr(8) & nprof=0 slo = out[sel] nslo = n_elements(slo) for i=0,nslo-1 do begin dh = slo[i].alt[1] - slo[i].alt[0] if (dh le 500.) then begin nprof = nprof+1 sloalt = sloalt + slo[i].alt[0:7] sloprof = sloprof + slo[i].intcn2[0:7] endif endfor if (nprof lt 2) then begin ; print, 'No SLODAR high-res. data! Exiting...' continue endif ; print, nprof, ' SLODAR profiles averaged' nrun = nrun+1 sloalt = sloalt/nprof sloprof = sloprof/nprof/100. sodbin = fltarr(8) dh = sloalt[1]-sloalt[0] for i=0,37 do for j=0,7 do if (abs(sloalt[j] - sodalt[i]) le 0.5*dh) then sodbin[j] += sodprof[i] oplot, sloalt+0.*nrun, sloprof+0.5*nrun, linestyle=0 oplot, sloalt+0.*nrun, sodbin+0.5*nrun+10, linestyle=2 endfor ;stop end