anchor.diff:                      !print *, deltaz, deltay
                       ! far wake region
                       
  -                    !discontinuity_point = x0
  +                    ! find the final point where the original model is undefined
  +                    call discontinuity_point_func(x0, rotorDiameter(turb), ky, kz, yaw, Ct, & 
  +                                                 & discontinuity_point)
                       
  -                    if (x >= 0.0) then
  +                    if (x > discontinuity_point) then
                       
                           print *, x
       
  
positive.code:                     !print *, 'deficit sum fw: ', deficit_sum
                  ! near wake region (linearized)
                  else
                  
                      ! horizontal spread at far wake onset
                      call sigmay_func(ky_local(turb), 0.0_dp, rotorDiameter(turb), yaw(turb), &
                                      & sigmay0)
                  
                      ! vertical spread at far wake onset
                      call sigmaz_func(kz_local(turb), 0.0_dp, rotorDiameter(turb), sigmaz0)
                  
                      ! velocity deficit in the nearwake (linear model)
                      call deltav_near_wake_lin_func(deltay, deltaz,        &
                                       & Ct(turb), yaw(turb), sigmay0, sigmaz0,           & 
                                       & rotorDiameter(turb), x, x0, sigmay0, sigmaz0,    & 
                                       & deltav)
                                       
                      !print *, "here 3"
  
negative.code:             ! downstream distance from far wake onset to downstream turbine
              deltax0 = x - x0
              
              if (x > 0.0_dp) then
              
                  ! horizontal spread
                  call sigmay_func(ky, deltax0, rotorDiameter(turb), yaw(turb), sigmay)
  