anchor.diff:              y=y+0.5*yp*(s_length-Srefl)
   !            write(*,*) "s_length-Srefl", s_length-Srefl
               CALL CALC_ION_LOSS_CRY(IS,is2,PC,s_length-Srefl,DESt)
  -            CALL MOVE_AM_(IS,is2,NAM,s_length-Srefl,DESt,DLYi(IS2),DLRi(IS2),xp ,yp,PC)
  +            CALL move_am(IS,is2,NAM,s_length-Srefl,DESt,DLYi(IS2),DLRi(IS2),xp ,yp,PC)
               x = x + 0.5 * xp * (s_length - Srefl)
               y = y + 0.5 * yp * (s_length - Srefl)
               endif
  
positive.code:         y=y0+yp*s
          iProc = proc_AM
          CALL CALC_ION_LOSS_CRY(IS,is2,PC,AM_Length,DESt)
          CALL MOVE_AM_(IS,is2,NAM,Am_Length,DESt,DLYi(IS2),dlri(is2),xp,yp,PC)
          x=x+xp*(s_length-s)
          y=y+yp*(s_length-s)
          GOTO 111
        ELSEIF ((x.GT.(C_xmax-Alayer)) .and. x.LT.(C_xmax)  ) THEN
          iProc = proc_AM
          CALL CALC_ION_LOSS_CRY(IS,is2,PC,s_length,DESt)
          CALL MOVE_AM_(IS,is2,NAM,s_length,DESt,DLYi(IS2),DLRi(IS2), xp,yp,PC)
          WRITE(*,*)'Fix here!'
          GOTO 111
        END IF
  
negative.code:             x = x + 0.5* xp * (s_length - Srefl)
              y = y + 0.5* yp * (s_length - Srefl)
              CALL CALC_ION_LOSS_CRY(IS,is2,PC,s_length-Srefl,DESt)
              CALL move_am(IS,is2,NAM,s_length-Srefl,DESt,DLYi(IS2),DLRi(IS2),xp ,yp,PC)
              x = x + 0.5 * xp * (s_length - Srefl)
              y = y + 0.5 * yp * (s_length - Srefl)
            ELSE                                      !opt 2: VC
  