pro read_sage2,dayno,latpos,lonpos,dir=dir ;+ ; this routine reads the haloe data ; dayno = the day number length L ; latpos is the latitude vector (3,L) where latpos(1,L) is the overpass point ; lonpos is the longitude vector (3,l) " " ; dir is the directory where the data is located ;- ; ; sage read (4258) ;Variable 1: 1 sunrise; -1 sunset ;Variable 2: Event date year ;Variable 3: Event date month ;Variable 4: Event date day ;Variable 5: Event date hour ;Variable 6: Event date minute ;Variable 7: Event date seconds ;Variable 8: Tangent point altitude (km) ;Variable 9: Latitude 150 km from subtangent point to spacecraft ;Variable 10: Longitude 150 km from subtangent point to spacecraft ;Variable 11: Latitude of subtangent point ;Variable 12: Longitude of subtangent point ;Variable 13: Latitude 150 km from subtangent point toward sun ;Variable 14: Longitude 150 km from subtangent point toward sun ;Variable 15: Latitude of spacecraft projected on the surface ;Variable 16: Longitude of spacecraft projected on the surface ;Variable 17: Azimuth to spacecraft ;Variable 18: Azimuth from spacecraft ;Variable 19: Unknown ;- get_lun,unit sun=1 & year=1900. & mon=0. & day=0. & hour=0. & min=0. sec=0. & tanalt=0. & lat150=0. & lon150=0. & lats=0. & lons=0. aztosp=0. & asfrsp=0. & lats150=0. & lonss150=0. dayno=dblarr(4258) latpos=fltarr(3,4258) lonpos=fltarr(3,4258) i=0 openr,unit,dir+'sage22.dat' while not eof(unit) do begin readf,unit,sun,year,mon,day,hour,min,sec,tanalt,lat150,$ lon150,lats,lons,lats150,lons150,aztosp,asfrsp 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(i)=double(day1900(strdate))+ double((hour*3600.+min*60.+sec)/86400.) latpos(0,i)=[lat150,lats,lats150] lonpos(0,i)=[lon150,lons,lons150] i=i+1 end free_lun,unit return end