
      subroutine pltdatv
c
c Line plot nfdatv fields (lat on x-axis, field on y-axis), and
c contour tndown: 
c
      parameter(imx=73,imxp3=imx+3,kmx=45,jmx=36,glat1=-87.5,dlat=5.)
      parameter(nflddat=6,nfdatv=12,ntndown=26,cpspval=1.e36)
      parameter(tndzp1=-19.25,tnddel=.25)
      character*8 datlab(nfdatv+1)
      character*56 toplab
      character*24 msspath
      common/datlb/ wrlb(jmx,ntndown+nfdatv),fdatv(imxp3*kmx*nflddat),
     +  tndown(jmx,ntndown),datlab,msspath
      dimension vp(4),gcmlat(jmx),tndowny(ntndown)
      data vp /0.17,0.95,0.20,0.90/
c
c Set up AG:
c
      charsz = .02
      expsz = .019
c
c Top label:
      call agsetc ('LABEL/NAME.','T')
      call agseti ('LINE/NUMBER.', 100)
      call agsetf ('LINE/CHARACTER.', charsz)
      call agseti ('LINE/MAX.',56)
C
c Left axis and labeL
      call agsetc ('LABEL/NAME.','L')
      call agseti ('LINE/NUMBER.', 100)
      call agsetf ('LINE/CHARACTER.', charsz)
      call agsetf ('AXIS/LEFT/NUMERIC/WIDTH/MANTISSA.', charsz)
      call agsetf ('AXIS/LEFT/NUMERIC/WIDTH/EXPONENT.', expsz)
      call agsetf ('AXIS/LEFT/NUMERIC/OFFSET.', charsz)
C
C Bottom axis
      call AGSETC ('LABEL/NAME.', 'B')
      call agseti ('LINE/NUMBER.', -100)
      call agsetf ('LINE/CHARACTER.', charsz)
      call agsetf ('AXIS/BOTTOM/NUMERIC/WIDTH/MANTISSA.', charsz)
      call agsetf ('AXIS/BOTTOM/NUMERIC/WIDTH/EXPONENT.', expsz)
      call agsetf ('AXIS/BOTTOM/NUMERIC/OFFSET.', charsz)
      call agseti('DASH/LENGTH.',40)
      call agsetf('DASH/CHARACTER.',.016)
c
      do j=1,jmx
        gcmlat(j) = glat1+(j-1)*dlat
      enddo
      call set(vp(1),vp(2),vp(3),vp(4),0.,1.,0.,1.,1)
c
c lset=2 -> AG will use only fractional from set call
      lset = 2
c
c Line plot lower boundaries:
c
      do ip=1,nfdatv
        lendlab = lenstr(datlab(ip))
        write(toplab,"(a,' BOUNDARY FROM ',a)") 
     +    datlab(ip)(1:lendlab),msspath(1:lenstr(msspath))
        lenlab = lenstr(toplab)
        call displa(2,1,1)
        call anotat('LATITUDE',datlab(ip),0,lset,-1,l)
        call ezxy(gcmlat,wrlb(1,ip),jmx,toplab(1:lenlab))
        call frame
        write(6,"('line plot: ',a)") toplab(1:lenlab)
      enddo
c
c Contour tndown:
c
      call cpsetup(cpspval)
      xmid = 0.5*(vp(1)+vp(2))
      call cpseti('SET',0)
      call cpseti('MAP',0)
      call cpsetr('ILX',xmid)
      call cpsetr('ILY',-.16)
      call cpseti('ILP',0)
      call cpsetr('ILS',.016)
      do k=1,ntndown
        tndowny(k) = tndzp1+(k-1)*tnddel
      enddo 
      call cpsetr('YC1',tndowny(1))
      call cpsetr('YCN',tndowny(ntndown))
      call cpsetr('XC1',gcmlat(1))
      call cpsetr('XCM',gcmlat(jmx))
      call set(vp(1),vp(2),vp(3),vp(4),
     +        -90.,90.,tndowny(1),tndowny(ntndown),1)
      call contour(tndown,jmx,jmx,ntndown,0.,1.,0.)
      write(toplab,"('TN LOWER BOUNDARY (CIRA88) ',a)") 
     +  msspath(1:lenstr(msspath))
      call wrlab(toplab(1:lenstr(toplab)),xmid,vp(4)+.03,0.)
      call labrect(gcmlat,jmx,tndowny,ntndown,'LATITUDE','ZP',0.)
      call frame
      write(6,"('Contoured tndown')") 
      return
      end
