      subroutine driver_cu(dlat,dlon,time,isdata,height,pure,ph1,ph2)

c     This program is a generic driver to evauluate the
c     height of the tide at (dlat,dlon) at a time in seconds
c     after 1 Jan 1992 00:00:00.  Height is returned at
c     a height in cm.
c    
c     By: Craig Tierney
c     Date: 24 Nov 1994
c

      implicit none 
      double precision dlat,dlon,time,height,t0,pure
      integer nt, ns 
      PARAMETER (NT=3,NS=2)
      logical isdata
      double precision tlp, tide, ltide
      double precision ph1(nt,ns), ph2(nt,ns)
      double precision xmjd0, dmjd 
      real  rtide,lat,lon
      save
      logical pseudo

c***xmjd0 is the modified julian date for 1 Jan 1992 00:00:00 in days
      data xmjd0 /48622.d0/, dmjd /0.125d0/


c  Find the tide height
      height=-999.d0
      lat=real(dlat)
      lon=real(dlon)
      t0=time
      call otide (lon,lat,time,rtide)
      tide=dble(rtide)

      isdata=.TRUE.
      if (tide .eq. -9999.0) then
        isdata=.FALSE.
      else
        tide=100.d0*tide
      endif
      if (isdata) then 
c Convert time to mjd
      time=t0+xmjd0*86400.0
c  Correct for Load tide
      t0=time
      call driver_lt(dlat,dlon,time,isdata,ltide)
      if (isdata) then
       height=dble(tide)+ltide
      else
        height=-9999.0
      endif
      pure=dble(tide)
      endif
      call  phase(dlon,dlat,ph1,ph2)

      return 
      end
