
      subroutine wrdat(lu,flnm,satut,satlat,satlon,satalt,gcm,npts,
     +  nhtscale,nfplt)
      dimension satut(npts),satlat(npts),satlon(npts),satalt(npts),
     +  gcm(npts,nhtscale,nfplt)
      logical isopen
      character*(*) flnm
c
      inquire(lu,opened=isopen)
      if (.not.isopen) then
        call assgn(flnm,lu,ier)
        write(lu,"('point     ut     lat      lon     alt')")
        write(lu,"('-------------------------------------')")
      endif
      do i=1,npts
        write(lu,"(i5,f7.3,f8.3,f9.3,f8.3)")
     +    i,satut(i),satlat(i),satlon(i),satalt(i)
        do ip=1,nfplt
          write(lu,"('GCM data: ip=',i2)") ip
          write(lu,"(6e12.4)") (gcm(i,k,ip),k=1,nhtscale)
        enddo
      enddo     
      return
      end
