      SUBROUTINE SIZER(MXNAT,NAT,IXYZ,LXYZ)
      IMPLICIT NONE
C Arguments:
      INTEGER MXNAT,NAT
      INTEGER LXYZ(3)
      INTEGER*2 IXYZ(MXNAT,3)
C Local variables:
      CHARACTER CMSGNM*70
      INTEGER JA,JD,JX
      INTEGER LXMIN(3),LXMAX(3)
C***********************************************************************
C
C Purpose: to determine full extent of target in x,y,z directions
C in order to determine what "computational" volume will be.
C B.T.Draine, Princeton University Observatory, 96.01.26
C History:
C 96.11.21 (BTD) modified to replace WRITE(0,... with CALL WRIMSG
C Copyright (C) 1996 B.T. Draine and P.J. Flatau
C This code is covered by the GNU General Public License.
C***********************************************************************
      DO JD=1,3
         LXMIN(JD)=IXYZ(1,JD)
         LXMAX(JD)=LXMIN(JD)
      ENDDO
      DO JD=1,3
         DO JA=2,NAT
            JX=IXYZ(JA,JD)
            IF(JX.LT.LXMIN(JD))LXMIN(JD)=JX
            IF(JX.GT.LXMAX(JD))LXMAX(JD)=JX
         ENDDO
      ENDDO
      DO JD=1,3
         LXYZ(JD)=LXMAX(JD)-LXMIN(JD)+1
      ENDDO
      JA=LXYZ(1)*LXYZ(2)*LXYZ(3)
      WRITE(CMSGNM,6000)LXYZ,JA
      CALL WRIMSG('SIZER ',CMSGNM)
 6000 FORMAT('Target size L_x*L_y*L_z=',I4,' *',I4,' *',I4,' =',I6)
      RETURN
      END
