pro read_poam,dayno,latpos,lonpos,aztop=aztop,dir=dir ;+ ; this routine reads the poam data file ; ; dir = directory where the data is located ; dayno is the daynumber of the day ; latpos = the latitude positon ; lonpos = the longitude position ; aztop is the azimuth to the point ; ;Variable 2: Event date year ;Variable 3: Event date month ;Variable 4: Event date day ;Variable 7: Event date seconds ;Variable 11: Latitude of subtangent point at 20 km altitude ;Variable 12: Longitude of subtangent point ;Variable 15: Latitude of spacecraft projected on the surface ;Variable 16: Longitude of spacecraft projected on the surface ;Variable 17: Azimuth to spacecraft (blank) ;- get_lun,unit year=1900 & mon=0 & day=0 sec=0.0 & latsx=0. & lons=0. aztosp=0. dayno=double([0.]) latpos=double([0.]) lonpos=double([0.]) aztop=double([0.]) i=0 openr,unit,dir+'poam3_latlon.txt' while not eof(unit) do begin readf,unit,year,mon,day,sec,latsx,lons,aztosp if mon le 9 then strmon='0'+str(mon) else strmon=str(mon) if day le 9 then strday='0'+str(day) else strday=str(day) strdate=string(fix(year),format='(i4)')+strmon + strday dayno=[dayno,double(day1900(strdate))+ double(sec)/86400.] latpos=[latpos,double(latsx)] lonpos=[lonpos,double(lons)] aztop=[aztop,double(aztosp)] i=i+1 if i gt 2395 then goto,skip end skip: dayno=dayno(1:*) latpos=latpos(1:*) lonpos=lonpos(1:*) aztop=aztop(1:*) free_lun,unit return end