C
      subroutine get_bcstime(kd0,sec0,kdf,secf,ntbc,kdbc,secbc,delttbc)
C
C compute the time step and the times for the boundary conditions 
C that moody will send saco.

        integer kd0,kdf
        real    sec0, secf
        integer ntbc
        real    delttbc
	integer kdbc(ntbc)
	real    secbc(ntbc)
	real*8  totalsecs
C
        integer i 
	real    totalhr

        totalhr = (kdf - kd0)*24 + (secf - sec0)/3600. 
	totalsecs = (kdf - kd0)*86400 + (secf - sec0)
	delttbc = totalsecs/float(ntbc-1)
        write(*,*)'get_bcstime Inputs',kd0, sec0, kdf, secf,ntbc
        write(*,*)'  DELTTBC, totalhr,totalsecs', 
     $               DELTTBC, totalhr,totalsecs
        if(ntbc.lt.1) then 
           WRITE(*,*)'bcs1: bad initialization. ntbc <1',ntbc
           WRITE(2,*)'bcs1: bad initialization. ntbc <1',ntbc
          stop
        endif
        
        kdbc(1) = kd0
        secbc(1) = sec0
        do i = 2, ntbc
          kdbc(i) = kdbc(i-1)
          secbc(i) = secbc(i-1) + DELTTBC
          if(secbc(i).ge.86400.) call up_date(kdbc(i),secbc(i))
        enddo
        write(*,*)' kdbc(1),secbc(1),kdbc(ntbc),secbc(ntbc)'
        write(*,*) kdbc(1),secbc(1),kdbc(ntbc),secbc(ntbc)

      return 
      end
