	subroutine InWhatState(rLon,rLat,iStateNum)

	character *2, cState
	real rXPoly(1:10000)
	real rYPoly(1:10000)
	real rLon
	real rLat
	real rX
	real rY

	iStateNum = 99

	do i=1,50

	  if (iStateNum.lt.99) then
	    return
	  endif

	  write (cState,'(i2.2)') i
	  iCount1=0
	  open (unit=44,file=
     +    '/ncdc/gcl/bgleason/polygons/usa/states/'//cState//'.poly')

5	  read (44,*,end=50,err=100) rX,rY 
	
	  iCount1=iCount1+1
	  rXPoly(iCount1)=rX
	  rYPoly(iCount1)=rY

	  goto 5

100	  call pnpoly(rLon,rLat,rXPoly,rYPoly,iCount1,iInOut)
	  if (iInOut.ge.0) then	
	    iStateNum=i
	  endif
	  iCount1=0
	  goto 5

50	  close(44)

	  call pnpoly(rLon,rLat,rXPoly,rYPoly,iCount1,iInOut)
	  if (iInOut.ge.0) then	
	    iStateNum=i
	  endif

	enddo

	return
	end
