anchor.diff:        END IF      
      
      END IF
  +   
  +   
  +   
  +      !............................................................................................
  +      ! Set Init outputs for linearization (after TMD, in case we ever add the TMD to the linearization features):
  +      !............................................................................................
  +   
  +   if (InitInp%Linearize) then
  +            
  +      ! If the module does allow linearization, return the appropriate Jacobian row/column names here:   
  +      ! Allocate and set these variables: InitOut%LinNames_y, InitOut%LinNames_x, InitOut%LinNames_xd, InitOut%LinNames_z, InitOut%LinNames_u 
  +      
  +      CALL AllocAry( InitOut%LinNames_y, 6+p%NumOuts, 'LinNames_y', ErrStat2, ErrMsg2 )
  +         CALL CheckError( ErrStat2, ErrMsg2 )
  +         IF (ErrStat >= AbortErrLev) RETURN
  +         
  +      do i=1,size(Indx_Y_BlPitchCom)
  +         InitOut%LinNames_y(Indx_Y_BlPitchCom(i)) = 'BlPitchCom('//trim(num2lstr(i))//'), rad'
  +      end do
  +      InitOut%LinNames_y(Indx_Y_YawMom)  = 'YawMom, Nm'
  +      InitOut%LinNames_y(Indx_Y_GenTrq)  = 'GenTrq, Nm'
  +      InitOut%LinNames_y(Indx_Y_ElecPwr) = 'ElecPwr, W'
  +      do i=1,p%NumOuts
  +         InitOut%LinNames_y(i+Indx_Y_WrOutput) = trim(p%OutParam(i)%Name)//', '//p%OutParam(i)%Units
  +      end do
  +      
  +      
  +      CALL AllocAry( InitOut%LinNames_u, 3, 'LinNames_u', ErrStat2, ErrMsg2 )
  +         CALL CheckError( ErrStat2, ErrMsg2 )
  +         IF (ErrStat >= AbortErrLev) RETURN
  +
  +      InitOut%LinNames_u(Indx_u_Yaw    ) = 'Yaw, rad'
  +      InitOut%LinNames_u(Indx_u_YawRate) = 'YawRate, rad/s'
  +      InitOut%LinNames_u(Indx_u_HSS_Spd) = 'HSS_Spd, rad/s'
  +                          
  +   end if
  +   
      
         !............................................................................................
         ! Clean up the local variables:
  
positive.code:          call allocAry(dYdu, 6+p%NumOuts, 3, 'dYdu', ErrStat2, ErrMsg2)
           call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
        end if
        
        
           ! skipping TMD module in linearization for now:
        !IF (p%CompNTMD) THEN 
        !   CALL TMD_CalcOutput( t, u%NTMD, p%NTMD, x%NTMD, xd%NTMD, z%NTMD, OtherState%NTMD, y%NTMD, m%NTMD, ErrStat2, ErrMsg2 )
        !END IF
        !
        !IF (p%CompTTMD) THEN 
        !   CALL TMD_CalcOutput( t, u%TTMD, p%TTMD, x%TTMD, xd%TTMD, z%TTMD, OtherState%TTMD, y%TTMD, m%TTMD, ErrStat2, ErrMsg2 )
        !END IF
         
     
        !   ! Torque control:
        !> Compute
  
negative.code:          dYdu(Indx_Y_GenTrq, Indx_u_HSS_Spd)   = GenTrq
           dYdu(Indx_Y_ElecPwr,Indx_u_HSS_Spd)  = ElecPwr
  
              
           ! Pitch control:
        !> \f$ \frac{\partial Y_{BlPitchCom_k}}{\partial u} = 0 \f$
                    
  