pro pick_date, next_time ;next_time=5 ;get the number of lines in the file openr,10,'num_lines.dat' readf,10,num_lines close,10 ;make the array to hold the lines in the file file_lines=strarr(num_lines) ;read in all the lines in the file openr,20,'sgp' readf,20,file_lines close,20 ;print the line of the file to be manipulated print,next_time,' ',file_lines[next_time] ;separate the line into the substrings parts1=strsplit(file_lines[next_time],/extract) ;separate the substrings print,parts1[0] ;year,month,day day=strmid(parts1[0],0,2) print,'day',day month=strmid(parts1[0],2,3) print,'month',month year=strmid(parts1[0],5,2) year='20'+year print,'year',year print,parts1[1] ;hour,minute,second parts3=strsplit(parts1[1],':',/extract) hour=parts3[0] minute=parts3[1] second=parts3[2] xhour=float(hour) xminute=float(minute) xsecond=float(second) print,hour,minute,second print,parts1[2] ;EOS zenith angle zangle=float(parts1[2]) print,zangle ;only use the time that have a zenith angle less than 50 degrees ;only use the times that are during the daytime, 5am to 7pm if (zangle le 50 and xhour ge 10) then begin if (month eq 'Jan') then month='01' if (month eq 'Feb') then month='02' if (month eq 'Mar') then month ='03' if (month eq 'Apr') then month='04' if (month eq 'May') then month='05' if (month eq 'Jun') then month='06' if (month eq 'Jul') then month='07' if (month eq 'Aug') then month='08' if (month eq 'Sep') then month='09' if (month eq 'Oct') then month='10' if (month eq 'Nov') then month='11' if (month eq 'Dec') then month='12' openw,30,'overpassbracket' printf,30,year,' ',month,' ',day,' ',hour,' ',minute,' ',second,' 10',' 50',' no' print,'***************************I can use this overpass***********************' close,30 openw,40,'good_angle_time.dat' printf,40,1 close,40 endif else begin openw,40,'good_angle_time.dat' printf,40,0 close,40 endelse end