      program csv2dat
      implicit none

c -----
c number of observer
      integer NOBS
      parameter (NOBS=24)

c number of data
      integer NDAT
      parameter (NDAT=121)

c location data IO
      integer IS
      parameter (IS=11)

c -----
c station postion
      real    x(NOBS), y(NOBS)

      
c time
      character*8  HHMMSS

c data
      real    ta(NOBS,NDAT)
      real    wd(NOBS,NDAT)
      real    ws(NOBS,NDAT)

c time from start
      integer t

c loop control
      integer i, j

c -----
c read station postion
      open(IS,file='station.dat')
      do 100 i = 1, NOBS
        read(IS,*) x(i), y(i)
 100  continue
      close(IS)

c read data
      do 120 i = 1, NOBS
	do 110 j = 1, NDAT
          read(*,*) HHMMSS, ta(i,j)
c          write(*,*) i, j, HHMMSS, ta(i,j)
 110    continue
 120  continue

c output temperature data for gnuplot
c      do 220 j = 1, NDAT
c        t = j - 1
c        do 210 i = 1, NOBS
c          write(*,*) t, i, ta(i,j)
c 210    continue
c        write(*,*)
c 220  continue

c output temperature data for gnuplot
      do 210 i = 1, NOBS
        write(*,*) x(i), y(i), (ta(i,j), j=1,NDAT)
 210  continue


      stop
      end
