C*********************************************************************
C*********************************************************************
C
      SUBROUTINE SETGRD
     O   ( ZGRID, FDZ, FDZM, DX,
     O     RGRID, RDZ, RDZM,
     D     NZ, NZB, NZR, NZRB             )
C
C*********************************************************************
      IMPLICIT REAL*8 ( A-H, O-Z )
C*********************************************************************
C
      DIMENSION ZGN(-10:1000)
C
      DIMENSION ZGRID(-2:NZB), FDZ(-2:NZB), FDZM(-2:NZB)
      DIMENSION RGRID(-2:NZRB), RDZ(-2:NZRB), RDZM(-2:NZRB)
C
C---------------------------------------------------------------------
C
C
      DX = 100.0D0
C
C
      DO 11 IZ = 0, NZ
         ZGN ( IZ ) = 100.0D0 * IZ
 11   CONTINUE
C
      ZGN(NZ+1) = 2.0D0 * ZGN(NZ) - ZGN(NZ-1)
      ZGN(NZ+2) = 2.0D0 * ZGN(NZ) - ZGN(NZ-2)
      ZGN(NZ+3) = 2.0D0 * ZGN(NZ) - ZGN(NZ-3)
      ZGN(  -1) = - ZGN(   1)
      ZGN(  -2) = - ZGN(   2)
C
      DO 12 IZ = 0, NZ+2
         ZGRID(IZ) = ( ZGN(IZ) + ZGN(IZ+1) ) / 2.0D0
 12   CONTINUE
C
      ZGRID(-1) = - ZGRID(0)
      ZGRID(-2) = - ZGRID(1)

      DO 13 IZ = 0, NZR+3
         ZGN ( IZ ) = 100.0D0 * IZ
 13   CONTINUE
C
C      ZGN(NZ+1) = 2.0D0 * ZGN(NZ) - ZGN(NZ-1)
C      ZGN(NZ+2) = 2.0D0 * ZGN(NZ) - ZGN(NZ-2)
C      ZGN(NZ+3) = 2.0D0 * ZGN(NZ) - ZGN(NZ-3)
      ZGN(  -1) = - ZGN(   1)
      ZGN(  -2) = - ZGN(   2)
C
      DO 14 IZ = 0, NZR+2
         RGRID(IZ) = ( ZGN(IZ) + ZGN(IZ+1) ) / 2.0D0
 14   CONTINUE
C
      RGRID(-1) = - RGRID(0)
      RGRID(-2) = - RGRID(1)

C
      DO 21 IZ = 0, NZ-1
         FDZ(IZ) = ( ZGN(IZ+1) - ZGN(IZ) )  / DX
 21   CONTINUE
C
      FDZ(-1)   = FDZ(0)
      FDZ(-2)   = FDZ(1)
      FDZ(NZ)   = FDZ(NZ-1)
      FDZ(NZ+1) = FDZ(NZ-2)
      FDZ(NZ+2) = FDZ(NZ-3)
C
C
      DO 22 IZ = 0, NZ
         FDZM(IZ) = ( FDZ(IZ-1) + FDZ(IZ) ) / 2.0D0
 22   CONTINUE
C
      FDZM(-2)   = FDZM(2)
      FDZM(-1)   = FDZM(1)
      FDZM(NZ+1) = FDZM(NZ-1)
      FDZM(NZ+2) = FDZM(NZ-2)

      DO 31 IZ = 0, NZR+2
         RDZ(IZ) = ( ZGN(IZ+1) - ZGN(IZ) )  / DX
 31   CONTINUE
C
      RDZ(-1)   = RDZ(0)
      RDZ(-2)   = RDZ(1)
C
C
      DO 32 IZ = 0, NZRB
         RDZM(IZ) = ( RDZ(IZ-1) + RDZ(IZ) ) / 2.0D0
 32   CONTINUE
C
      RDZM(-2)   = RDZM(2)
      RDZM(-1)   = RDZM(1)
C
C=====================================================================
C
      RETURN
      E N D
