anchor.diff:              hadd(m,2,0,i-1) = hadd(m,2,0,i-1)
        &                      - 0.5d0*dtdx1d(i-1)*cpamdq(m,i)
               hadd(m,1,0,i)   = hadd(m,1,0,i)
  -     &                      - 0.5d0*dtdx1d(i-1)*cmapdq(m,i)
  +     &                      - 0.5d0*dtdx1d(i)*cmapdq(m,i)
               hadd(m,2,0,i)   = hadd(m,2,0,i)
  -     &                      - 0.5d0*dtdx1d(i-1)*cpapdq(m,i)
  +     &                      - 0.5d0*dtdx1d(i)*cpapdq(m,i)
   c
   c           # Transverse propagation of the increment wave (and the
   c           # correction wave if m4=2) between cells
  
positive.code: c        # For correction terms below, need average of dtdx in cell
  c        # i-1 and i.  Compute these and overwrite dtdx1d:
  c
           dtdx1d(i-1) = 0.5d0 * (dtdx1d(i-1) + dtdx1d(i))
  c
           do 120 m=1,meqn
              cqxx(m,i) = 0.d0
              do 119 mw=1,mwaves
                 cqxx(m,i) = cqxx(m,i) + 0.5d0 * dabs(s(mw,i))
       &             * (1.d0 - dabs(s(mw,i))*dtdx1d(i-1)) * wave(m,mw,i)
    119          continue
              fadd(m,i) = fadd(m,i) + cqxx(m,i)
    120       continue
  
negative.code: c
              if(m3.lt.2) go to 200
                 hadd(m,2,0,i)   = hadd(m,2,0,i)
       &                         + dtdx1d(i)*cpcqxxp(m,i)
                 hadd(m,1,0,i)   = hadd(m,1,0,i)
       &                         + dtdx1d(i)*cmcqxxp(m,i)
                 hadd(m,2,0,i-1) = hadd(m,2,0,i-1)
       &                         - dtdx1d(i-1)*cpcqxxm(m,i)
                 hadd(m,1,0,i-1) = hadd(m,1,0,i-1)
  