      SUBROUTINE GETCOM(COORD,NPOINT,CENTRE)                            GETC001
C-----------------------------------------------------------------------GETC002
C                                                                       GETC003
C  SUBROUTINE GETCOM  Calculate centre of mass of supplied data points  GETC004
C                                                                       GETC005
C----------------------------------------------------------------------+GETC006
                                                                        GETC007
      INTEGER       IPT, NPOINT                                         GETC008
      REAL          CENTRE(3), COORD(3,NPOINT), XSUM, YSUM, ZSUM        GETC009
                                                                        GETC010
C---- Initialise values                                                 GETC011
      XSUM = 0.0                                                        GETC012
      YSUM = 0.0                                                        GETC013
      ZSUM = 0.0                                                        GETC014
                                                                        GETC015
C---- Loop through the data points                                      GETC016
      DO 300, IPT = 1, NPOINT                                           GETC017
          XSUM = XSUM + COORD(1,IPT)                                    GETC018
          YSUM = YSUM + COORD(2,IPT)                                    GETC019
          ZSUM = ZSUM + COORD(3,IPT)                                    GETC020
300   CONTINUE                                                          GETC021
                                                                        GETC022
C---- Calculate centre of mass and adjust all coordinates accordingly   GETC023
      CENTRE(1) = XSUM / REAL (NPOINT)                                  GETC024
      CENTRE(2) = YSUM / REAL (NPOINT)                                  GETC025
      CENTRE(3) = ZSUM / REAL (NPOINT)                                  GETC026
      DO 400, IPT = 1, NPOINT                                           GETC027
          COORD(1,IPT) = COORD(1,IPT) - CENTRE(1)                       GETC028
          COORD(2,IPT) = COORD(2,IPT) - CENTRE(2)                       GETC029
          COORD(3,IPT) = COORD(3,IPT) - CENTRE(3)                       GETC030
400   CONTINUE                                                          GETC031
                                                                        GETC032
      RETURN                                                            GETC033
      END                                                               GETC034
