anchor.diff:         END DO
       END DO
       
  -    TI_average = TI_accumulation / REAL(counter1) 
  +    TI_average = TI_accumulation / REAL(counter1,ReKi) 
      
      !-------------------------------------------------------------------------------------------------
      ! calculate the apprant TI due to the meadering
  
negative.code: !............................................................................
      
      INTEGER ::    ary_length
      REAL(ReKi)    ::    ary(ary_length)
      REAL(ReKi)    ::    min_of_array
      INTEGER ::    I
      
  
      min_of_array = ary(1) 
      
      DO I = 2,ary_length
          IF (ary(I) < min_of_array) THEN
              min_of_array = ary(I)
          END IF
  