; -------------------- SODAR data selection: new format ; Jan 15, 2004 function selsod, mm, dd restore, 'sodar1.idl' ; prof = { UTyear: 0, UTmonth: 0, UTday: 0, UThour:0.0, UTmin:0.0, $ ; nlevels:40, alt:FLTARR(40), cn2:FLTARR(40) } eve = where((spdat.UTmonth eq mm) and (spdat.UTday eq dd) and (spdat.UThour gt 12) ) dd1 = dd+1 & mm1 = mm if (dd1 gt 30) 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 = 0 & nmorn = 0 if (eve[0] ge 0) then neve = n_elements(eve) if (morn[0] ge 0) then nmorn = n_elements(morn) nsod = neve + nmorn prof = spdat[0] sod = replicate(prof,nsod) if (eve[0] ge 0) then sod(0:neve-1) = spdat(eve) if (morn[0] ge 0) then sod(neve:nsod-1) = spdat(morn) return, sod end ;----------------------------------------------------