If your question is just about generating the time axis data, you have two options:
1) Just parse the date data from your ASCII file, convert the parsed data to Julian date/time data, and don't worry about setting up time intervals with TIMEGEN. Here is a parser for the date on a line with this exact format: "20080330 23:30 pos1 99"
IDL> ; Put example data in a file
IDL> importedDataLine = '20080330 23:30 pos1 99'
IDL> openw, lun, 'trash.dat', /GET_LUN
IDL> printf, lun, importedDataLine
IDL> free_lun, lun
IDL> ; How to read the data into IDL
IDL> openr, lun, 'trash.dat', /GET_LUN
IDL> yr = 0 & mo = 0 & day = 0 & hr = 0 & min = 0
IDL> posNo = 0 & posValue = 0
IDL> readf, lun, yr, mo, day, hour, min, posNo, posValue, $
IDL> FORMAT='(I4, I2, I2, X, I2, X, I2, 4X, I1, X, I2)'
IDL> help, mo, day, yr, hr, min, posNo, posValue
;MO INT = 3
;DAY INT = 30
;YR INT = 2008
;HR INT = 23
;MIN INT = 30
;POSNO INT = 1
;POSVALUE INT = 99
IDL> print, julday(mo, day, yr, hr, min, 0)
; 2454556.5
2) If you do not want to parse every time, you can instead run a JULDAY function like the one I showed just above on the first date and time in your series, then generate, let's say, 30 days worth of time intervals of 10 minutes with code like the following:
nIntervals = 6 * 24 * 30
myStartTime = julday(mo, day, yr, hr, min, 0)
times = timegen(nIntervals, START=myStartTime, STEP_SIZE=10, UNITS='Minutes')
print, times[0:9}, FORMAT='(D18.10)'
James Jones
|