      PROGRAM READATA
C --------------------------------------------------------------
C This program reads Levitus climatology from unformatted files,
c then writes it to formatted files
C --------------------------------------------------------------
      DIMENSION TLEV(360,180),SLEV(360,180)
      CHARACTER*15 SEASON(5),CEASON(5)
      DATA SEASON/
     1 'modelev_win.dat',
     2 'modelev_spr.dat',
     3 'modelev_sum.dat',
     4 'modelev_aut.dat',
     5 'modelev_ann.dat'/
      DATA CEASON/
     1 'modolev_win.dat',
     2 'modolev_spr.dat',
     3 'modolev_sum.dat',
     4 'modolev_aut.dat',
     5 'modolev_ann.dat'/
      DO 200 M=1,5
      WRITE(*,10) M
 10   FORMAT('season',I2)
      OPEN(40,file=SEASON(M),form='unformatted')
      OPEN(44,file=CEASON(M))
      REWIND 40
      REWIND 44
      DO 100 K=1,33
      WRITE(*,90) K
 90   FORMAT('level',I3)
      READ(40)
     1 ((TLEV(I,J),I=1,360),J=1,180),((SLEV(I,J),I=1,360),J=1,180)
      DO 100 J=1,180
      WRITE(44,110) J,K,(TLEV(I,J),I=1,360)
 100  WRITE(44,110) J,K,(SLEV(I,J),I=1,360)
 110  FORMAT(2I4/(10F9.5))
      CLOSE(40)
      CLOSE(44)
 200  CONTINUE
      END