      SUBROUTINE DEL4(DK,TK,S,RT,RM,X,DIM,Y,TEM,W,ZEM,Z,QM)
CJPB  COMPLEX*8 RT( 17 , 17 , 6 ),RM( 17 , 17 , 6 ),
      COMPLEX   RT( 17 , 17 , 6 ),RM( 17 , 17 , 6 ),
     1X( 17 , 17 , 7 ),DIM( 17 , 17 , 7 ),
     2Y( 17 , 17 , 7 ),TEM( 17 , 17 , 7 ),
     3W( 17 , 17 , 7 ),ZEM( 17 , 17 , 7 ),
     4Z( 17 , 17 ),QM( 17 , 17 )
      DIMENSION S( 17 , 17 )
      RDK=-DK/( 6370000. * 6370000. )
      RDK=RDK/( 6370000. * 6370000. )
      DO 10 LL=1, 17
      N=LL-2
      DO 10 I=1, 17
      N=N+1
      S(I,LL)=RDK*N*N*(N+1.)*(N+1.)
10    CONTINUE
      DO 30 K=1, 7
      CALL DAMP1(X(1,1,K),S,DIM(1,1,K))
30    CONTINUE
      K= 7
      CALL DAMP2(Y(1,1,K),S,TEM(1,1,K))
      CALL DAMP2(W(1,1,K),S,ZEM(1,1,K))
      IF(DK.EQ.TK) GO TO 41
      RTK=-TK/( 6370000. * 6370000. )
      RTK=RTK/( 6370000. * 6370000. )
      DO 40 LL=1, 17
      N=LL-2
      DO 40 I=1, 17
      N=N+1
      S(I,LL)=RTK*N*N*(N+1.)*(N+1.)
40    CONTINUE
41    CONTINUE
C***  DAMP TEMP AND VORTICITY TENDENCIES
      DO 50 K=1, 6
      CALL DAMP2(Y(1,1,K),S,TEM(1,1,K))
      CALL DAMP2(W(1,1,K),S,ZEM(1,1,K))
50    CONTINUE
      DO 70 K=1, 6
      CALL DAMP2(RT(1,1,K),S,RM(1,1,K))
70    CONTINUE
C(DEBUGLINE) VERSION CREATED JULY 8 1982 BY J.SELA,NMC.
      RETURN
      END
