      program checkgap
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 
c                      c h e c k g a p
c
c  reads in a file with thr in first line and makes a file
c  of time spacing in seconds (for check with easyplot)
c
c  input: filename
c
c  rf jan 2012
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      implicit real*8(a-h,o-z)
      character*72 ifile
      write(*,*) 'input file name: '
      read(*,'(a)') ifile
      open(10,file=ifile,status='old')
      open(20,file='checkgap.out')
      dtmax = 0
c
      read(10,*) thrp
10    read(10,*,end=20) thr
      dt = (thr-thrp)*3600
      if (dt.gt.dtmax) then
        dtmax = dt
        thrmax = thr
      endif
      write(20,11) thr,dt
11    format(f11.6,f9.3)
      thrp = thr
      goto 10
c
20    write(*,21) dtmax,thrmax    
21    format(' maximal time gap:',f9.3,' sec, at t =',f11.6)
      end
