       subroutine round ( vect, idime, isigfig )
c
c    dac:zeus3d.round <--------- sets no of sig figs for vector elements
c                                                          october, 1990
c
c    written by: David Clarke
c    modified 1:
c
c  PURPOSE: This subroutine sets the number of significant figures of
c  the elements in the input vector to the specified number.
c
c  INPUT VARIABLES
c    vect      vector to be "rounded off"
c    idime     dimension of "vect"
c    isigfig   number of significant figures on output
c
c  OUTPUT VARIABLES
c    vect      rounded off input vector
c
c  LOCAL VARIABLES:
c
c  EXTERNALS: [NONE]
c
c-----------------------------------------------------------------------
c
c
c-----------------------------------------------------------------------
c------------------------ IMPLICIT STATEMENTS --------------------------
c-----------------------------------------------------------------------
c
       implicit      none
c
c-----------------------------------------------------------------------
c----------------------------- PARAMETERS ------------------------------
c-----------------------------------------------------------------------
c
c      Primary parameters:
c
       integer       in      , jn      , kn      , ijkn    , nxpx
     1             , nypx    , nxrd    , nyrd    , niov    , nios
     2             , ntsl    , mn      , nmd     , isig
       real*8        pi  , tiny  , huge  , one  , mone  , haf  , zro
c
       parameter     ( in = 5005, jn = 1, kn = 10, ijkn = 5005)
       parameter     ( nxpx = 1, nypx = 1, nxrd =   1, nyrd =   1 )
       parameter     ( niov =  20, nios =  20, ntsl =1000 )
       parameter     ( mn   =   1, nmd  =   1 )
       parameter     ( pi   = 3.1415926535898 )
       parameter     ( isig = 9, tiny = 1.0d-99, huge = 1.0d+99 )
       parameter     ( one  = 1.0d+00, mone = -1.0d+00
     1                               , haf  =  0.5d+00, zro = 0.0d+00)
c
c      Secondary parameters:
c
       integer        idim    , jdim
     1              , nt01    , nt02    , nt03    , nt04    , nt05
     2              , nt06    , nt07    , nt08    , nt09    , nt10
     3              , nt11    , nt12    , nt13    , nt14    , nt15
     4              , nt16    , nt17    , nt18    , nt19    , nt20
       parameter     ( idim =   kn, jdim =   in )
       parameter     ( nt01 = 600, nt02 = 600, nt03 =   7, nt04 =   5 )
       parameter     ( nt05 =  18, nt06 =   1, nt07 =  10, nt08 =  12 )
       parameter     ( nt09 =   5, nt10 =  54, nt11 =   8 )
       parameter     ( nt12 =        16, nt17 =         4 )
       parameter     ( nt13 = nt12 +  4, nt18 = nt17 +  1 )
       parameter     ( nt14 = nt13     , nt19 = nt18      )
       parameter     ( nt15 = nt14 + 30, nt20 = nt19 +  3 )
       parameter     ( nt16 = nt14 + 42 )
c
       integer       i       , idime   , isigfig , i1
       real*8        q1      , q2
c
       real*8        vect    (idime)
c
c-----------------------------------------------------------------------
c
       if (isigfig .le. 0) return
       q1 = 0.0
       do 10 i=1,idime
         q1 =   max ( q1, abs(vect(i)) )
10     continue
       if (q1 .eq. 0.0) return
       q1 =  log10 ( q1 )
       q2 = sign ( haf, q1 )
       i1 = isigfig -  int ( q1 + q2 + 0.5 )
       do 20 i=1,idime
         vect(i) = anint ( vect(i) * 10.0**i1 ) / 10.0**i1
20     continue
c
       return
       end
