; IDL program to ingest XFAS SODAR CT2 profiles into an IDL data structure ; Also saves data structure into an IDL save file. ; Dec 29, 2004: Travouillon format ;--------------------------------------------------------- ;--------------------------------------------------------- pro readall ; reads data from a list of files and saves in a structure prof = { UTyear: 0, UTmonth: 0, UTday: 0, UThour:0.0, UTmin:0.0, $ nlevels:39, alt:FLTARR(39), cn2:FLTARR(39)} tmp = import('sodar.txt', 45) nprof = n_elements(tmp(*,0)) print, nprof, ' profiles are read' ;stop spdat = REPLICATE(prof, nprof) spdat.UTyear = tmp(*,0) spdat.UTmonth = tmp(*,1) spdat.UTday = tmp(*,2) spdat.UThour = tmp(*,3) spdat.UTyear = tmp(*,0) spdat.UTyear = tmp(*,0) alt = (findgen(39)+2)*20. for i=0,nprof-1 do begin spdat[i].alt = alt spdat[i].cn2 = tmp(i,7:44) endfor save, filename='sodar1.idl', spdat print, 'Data are saved!' end