      subroutine pawt(dlat,dlon,awt)
c---------------------------------------------------
c
c pawt.f (slightly) modified by larry sorrell
c (1/23/97)
c *note* this subroutine also contains the entry
c point to the subroutine pawt2.f
c
c---------------------------------------------------

      dimension ib(18),grid(18,36)
      data ib/18*0./, grid/648*0./
      save grid, ib

      do 1 i=1,18 
         read(4)  k,(grid(i,j),j=1,k) 
 1       ib(i)=k 
      close(4)
      return

c---------------------------------------------------
c
c pawt2.f begins here.
c
c---------------------------------------------------

      entry pawt2(dlat,dlon,awt)

      i=min0(18,int((100.-dlat)*.1))
      if (dlon.lt.0.) dlon=dlon+360. 
      j=int(dlon/360.*ib(i))+1  
      awt=grid(i,j) 
      if(awt.eq.0.) then
         print 2,dlat,dlon,i,j,k 
 2       format(' awt=0. at lat,lon,i,j=',2f8.2,3i5) 
         print *, 'awt=0, data not same as area weight table'
         stop 'awt missing' 
      end if
      return
      end
