
      program tst
c
      parameter(imx=73,jmx=36)
      dimension plot(imx,jmx),viewport(4),iasf(13)
      data viewport /.12,.90,.2,.70/
      data lu/8/, nframes/6/
      data iasf/13*1/
c
      parameter(lrwrk=2000,liwrk=1000,liama=300000,lcra=10000)
      common/work/ rwrk(lrwrk),iwrk(liwrk),iama(liama),iiasf(13),
     +  iaia(10),igia(10),xcra(lcra),ycra(lcra)
      external drawcl
c
      call opngks
      call gsclip(0)
      call gsasf(iasf)
      call gsfais(1)
c
      call cpsetr('XC1',-180.)
      call cpsetr('XCM',180.)
      call cpsetr('YC1',-87.5)
      call cpsetr('YCN',87.5)
      call cpseti('SET',0)
      call cpseti('MAP',1)
      call cpseti('LLP -- line label positioning',3)
      call cpseti('LLO -- line label orientation',1)
c
      call mapsti('EL',0)
      call mappos(viewport(1),viewport(2),viewport(3),viewport(4))
      plon = 0.
      do i=1,nframes
        read(lu) plot
        call maproj('CE',0.,plon,0.)
        call mapset('MA',0.,0.,0.,0.)
        call mapint
        call maplot
        call cprect(plot,imx,imx,jmx,rwrk,lrwrk,iwrk,liwrk)
        call arinam(iama,liama)
        call cplbam(plot,rwrk,iwrk,iama)
        call cpcldm(plot,rwrk,iwrk,iama,drawcl)
        call cplbdr(plot,rwrk,iwrk)
        call frame 
        write(6,"('frame ',i3)") i
        plon = plon - 15.
      enddo
      call clsgks
      stop
      end
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
      subroutine drawcl(xcs,ycs,ncs,iai,iag,nai)
      dimension xcs(*),ycs(*),iai(*),iag(*)
      idr=1
      do i=1,nai
        if (iai(i).lt.0) idr=0
      enddo
      if (idr.ne.0) call curved(xcs,ycs,ncs)
      return
      end
