      SUBROUTINE CHGRES(MAXWV,IROMB,WAVE,MAXWVC,IROMBC,WAVEC)
C
      DIMENSION WAVE(1),WAVEC(1)
C
      MDIM=(MAXWV+1)*(MAXWV+1)*2
      IF(IROMB.EQ.0) MDIM=(MAXWV+1)*(MAXWV+2)
C
      NMC=0
      DO 10 M=1,MAXWVC+1
      NEND=M+MAXWVC
      IF(IROMBC.EQ.0) NEND=MAXWVC+1
      DO 10 N=M,NEND
      NMC=NMC+1
      NM=(MAXWV+1)*(M-1)+N-M+1
      IF(IROMB.EQ.0) NM=M*(MAXWV+1)-(MAXWV+1-N)-(M-1)*M/2
      DO 10 II=1,2
      X=0.
      IF(NM*2-2+II.LE.MDIM) X=WAVE(NM*2-2+II)
      IF(M.GT.MAXWV+1) X=0.
      IF(IROMB.EQ.1) THEN
      IF(N.GT.M+MAXWV) X=0.
      ENDIF
      IF(IROMB.EQ.0) THEN
      IF(N.GT.MAXWV+1) X=0.
      ENDIF
      WAVEC(NMC*2-2+II)=X
   10 CONTINUE
C
      RETURN
      END
