      PROGRAM ANNUALEVITUS
C ===============================
C David E. Dietrich, February, 1996
      DIMENSION TXMEAN(360,180),TYMEAN(360,180)
      DIMENSION TX(360,180),TY(360,180)
C ===============
C Input data files
      OPEN(21,file='tx-jan.dat',status='old')
      OPEN(22,file='tx-feb.dat',status='old')
      OPEN(23,file='tx-mar.dat',status='old')
      OPEN(24,file='tx-apr.dat',status='old')
      OPEN(25,file='tx-may.dat',status='old')
      OPEN(26,file='tx-jun.dat',status='old')
      OPEN(27,file='tx-jul.dat',status='old')
      OPEN(28,file='tx-aug.dat',status='old')
      OPEN(29,file='tx-sep.dat',status='old')
      OPEN(30,file='tx-oct.dat',status='old')
      OPEN(31,file='tx-nov.dat',status='old')
      OPEN(32,file='tx-dec.dat',status='old')
C
      OPEN(41,file='ty-jan.dat',status='old')
      OPEN(42,file='ty-feb.dat',status='old')
      OPEN(43,file='ty-mar.dat',status='old')
      OPEN(44,file='ty-apr.dat',status='old')
      OPEN(45,file='ty-may.dat',status='old')
      OPEN(46,file='ty-jun.dat',status='old')
      OPEN(47,file='ty-jul.dat',status='old')
      OPEN(48,file='ty-aug.dat',status='old')
      OPEN(49,file='ty-sep.dat',status='old')
      OPEN(50,file='ty-oct.dat',status='old')
      OPEN(51,file='ty-nov.dat',status='old')
      OPEN(52,file='ty-dec.dat',status='old')
C Output data files
      OPEN(60,file='tx-ann.dat')
      OPEN(61,file='ty-ann.dat')
      REWIND 21
      REWIND 22
      REWIND 23
      REWIND 24
      REWIND 25
      REWIND 26
      REWIND 27
      REWIND 28
      REWIND 29
      REWIND 30
      REWIND 31
      REWIND 32
      REWIND 41
      REWIND 42
      REWIND 43
      REWIND 44
      REWIND 45
      REWIND 46
      REWIND 47
      REWIND 48
      REWIND 49
      REWIND 50
      REWIND 51
      REWIND 52
      REWIND 60
      REWIND 61
      READ(21,5) I,J,XA,XB,XC,XD,FMT
      READ(41,5) I,J,XA,XB,XC,XD,FMT
 5    FORMAT(2I4/3X,F9.7,3(2X,F11.7),A10)
      WRITE(60,5) I,J,XA,XB,XC,XD,FMT
      WRITE(61,5) I,J,XA,XB,XC,XD,FMT
 15   FORMAT(5E15.7)
      READ(21,15) TX
      READ(41,15) TY
      DO 21 J=1,180
      DO 21 I=1,360
      TXMEAN(I,J)=TX(I,J)
 21   TYMEAN(I,J)=TY(I,J)
      READ(22,5) I,J,X,X,X,X,FMT
      READ(42,5) I,J,X,X,X,X,FMT
      READ(22,15) TX
      READ(42,15) TY
      DO 22 J=1,180
      DO 22 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 22   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(23,5) I,J,X,X,X,X,FMT
      READ(43,5) I,J,X,X,X,X,FMT
      READ(23,15) TX
      READ(43,15) TY
      DO 23 J=1,180
      DO 23 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 23   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(24,5) I,J,X,X,X,X,FMT
      READ(44,5) I,J,X,X,X,X,FMT
      READ(24,15) TX
      READ(44,15) TY
      DO 24 J=1,180
      DO 24 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 24   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(25,5) I,J,X,X,X,X,FMT
      READ(45,5) I,J,X,X,X,X,FMT
      READ(25,15) TX
      READ(45,15) TY
      DO 25 J=1,180
      DO 25 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 25   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(26,5) I,J,X,X,X,X,FMT
      READ(46,5) I,J,X,X,X,X,FMT
      READ(26,15) TX
      READ(46,15) TY
      DO 26 J=1,180
      DO 26 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 26   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(27,5) I,J,X,X,X,X,FMT
      READ(47,5) I,J,X,X,X,X,FMT
      READ(27,15) TX
      READ(47,15) TY
      DO 27 J=1,180
      DO 27 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 27   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(28,5) I,J,X,X,X,X,FMT
      READ(48,5) I,J,X,X,X,X,FMT
      READ(28,15) TX
      READ(48,15) TY
      DO 28 J=1,180
      DO 28 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 28   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(29,5) I,J,X,X,X,X,FMT
      READ(49,5) I,J,X,X,X,X,FMT
      READ(29,15) TX
      READ(49,15) TY
      DO 29 J=1,180
      DO 29 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 29   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(30,5) I,J,X,X,X,X,FMT
      READ(50,5) I,J,X,X,X,X,FMT
      READ(30,15) TX
      READ(50,15) TY
      DO 30 J=1,180
      DO 30 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 30   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(31,5) I,J,X,X,X,X,FMT
      READ(51,5) I,J,X,X,X,X,FMT
      READ(31,15) TX
      READ(51,15) TY
      DO 31 J=1,180
      DO 31 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 31   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      READ(32,5) I,J,X,X,X,X,FMT
      READ(52,5) I,J,X,X,X,X,FMT
      READ(32,15) TX
      READ(52,15) TY
      DO 32 J=1,180
      DO 32 I=1,360
      TXMEAN(I,J)=TXMEAN(I,J)+TX(I,J)
 32   TYMEAN(I,J)=TYMEAN(I,J)+TY(I,J)
      TMP=1./12.
      DO 36 J=1,180
      DO 36 I=1,360
      TXMEAN(I,J)=TMP*TXMEAN(I,J)
 36   TYMEAN(I,J)=TMP*TYMEAN(I,J)
      WRITE(60,15) TXMEAN
      WRITE(61,15) TYMEAN
      END
