subroutine areacalc(i,npts,jxarray,jyarray,iarea) c sequence number of polygon integer i c no of pts in polygon integer npts c point array for all polygons integer jxarray(2200,900), jyarray(2200,900) c 2*area of polygon integer iarea c point arrays for one polygon integer jx(900),jy(900) c 2*area of this polygon iarea = 0 do 1722 ii=npts,1,-1 c ii minus one iim1 = ii-1 if (ii.eq.1) then iim1=npts endif jx(ii)=jxarray(i,ii) jy(ii)=jyarray(i,ii) jx(iim1)=jxarray(i,iim1) jy(iim1)=jyarray(i,iim1) c twice area (integer) iarea = iarea - jx(ii)*jy(iim1) + jx(iim1)*jy(ii) c end of point loop ii 1722 continue return end