anchor.diff: +! implementation of the Bastankhah and Porte Agel (BPA) wake model for analysis
   subroutine porteagel_analyze(nTurbines, turbineXw, turbineYw, turbineZ, &
                                rotorDiameter, Ct, wind_speed, &
                                yawDeg, ky, kz, alpha, beta, I, wtVelocity)
  
positive.code: 
  end subroutine porteagel_analyze
  
  
  subroutine porteagel_visualize(nTurbines, nSamples, turbineXw, turbineYw, turbineZ, &
                               rotorDiameter, Ct, wind_speed, &
                               yawDeg, ky, kz, alpha, beta, I, velX, velY, velZ, wsArray)
  
negative.code: 
      ! magnitude term of gaussian at x0
      deltav0m = wind_speed * (                                         &
                  (1.0_dp - sqrt(1.0_dp - Ct *                          &
                  cos(yaw) / (8.0_dp * sigmay0 * sigmaz0 /              &
                                              (rotor_diameter ** 2)))))
                                              
      ! linearized gaussian magnitude term for near wake
      deltav = (((deltav0m - deltavs)/x0) * x + deltavs) *              &
          exp(-0.5_dp * (deltay / sigmay) ** 2) *                       &
          exp(-0.5_dp * (deltaz / sigmaz) ** 2)
      
  end subroutine deltav_near_wake_lin_func
  