
	  subroutine get_timeseries
	  include 'CASCO.DIM'
          include 'wind.h'
	  character*72 header


	  write(*,*)'Enter the number of lags for lagged correlation'
	  read(*,*)Nlags
	  write(*,*)'Nlags=',Nlags
c
c check dimension for lagged coeficient.
c
	  if (nlags.gt.nlagsdim)then
 	   write(*,*)'nlags=',nlags,' nlagsdim=',nlagsdim,' quiting'
 	   stop 4444
	  endif
	  open(777,FILE=windfile)
	  read(777,*)header
	  write(*,*)header
	  read(777,*)w_day,w_month,w_year,w_secs
	  write(*,*)w_day,w_month,w_year,w_secs
	  read(777,*)w_nsteps,w_delt
	  write(*,*)w_nsteps,w_delt
	  read(777,*)w_nseries
	  write(*,*)w_nseries
	  i=1
 100      continue
          read(777,*,end=101)wind(i,1:w_nseries)
	   write(*,*)i,wind(i,1:w_nseries)
	  i=i+1
          goto 100
 101      continue	  

	  close(777)
          i=i-1
	  write(*,*)'read ',i,'records from ',windfile 
        
	  if(i.gt.ntbcdim) then 
	    write(2,*)'casco input: Too many entries in timeseries'
	    write(2,*)'NTBCDIM = ',ntbcdim 
	    close(2)
	    stop
	 endif
	 
c         ntbc=i-1
c
c Compute time series startday
c
	 write(*,*)'Wind records begin',w_day,w_month,w_year 
         call GDAY(w_day,w_month,w_year,w_kd)	 
	 write(*,*)'Wind records begin',w_kd,w_secs 
	 end
