* Program to create time bins for averaging BAM data for February 2020, using Excel's Daverage function. IMPLICIT NONE CHARACTER*1 d ! For reading in the header. REAL dthour REAL EndTimeLST INTEGER i OPEN(1,FILE='BAMtimeFeb2020.txt') READ(1,1) d ! Read the header 1 FORMAT(a1) OPEN(2,FILE='BAMtimeForExcelFeb2020.txt') WRITE(2,*) 'StartTimeLST MiddleTimeLST EndTimeLST' dthour=1.0/24.0 ! One hour in Excel format based on 24 hours = 1 day, e.g. fraction of a day. DO i=1,100000 ! Allow for a long time record. READ(1,*,END=100) EndTimeLST WRITE(2,*) EndTimeLST-dthour+8.0/(24.0*60.0),EndTimeLST-dthour/2.0,EndTimeLST-10.0/(24.0*60.0) WRITE(2,*) ENDDO 100 CLOSE(1) CLOSE(2) END