anchor.diff:  !   if ( p_FAST%CompMooring == Module_MAP ) then ! MAP- ElastoDyn
   !              
   !      !===================================================   
  -!      !  y_ED%PlatformPtMesh and u_MAP%Morison%DistribMesh
  +!      !  y_ED%PlatformPtMesh and u_MAP%Morison%Mesh
   !      !===================================================    
   !         
   !            ! Transfer ED motions to HD motion input (HD inputs depend on previously calculated HD inputs from ED):
  
positive.code: 
     HD_Start = y_FAST%Lin%Modules(Module_HD)%Instance(1)%LinStartIndx(LIN_OUTPUT_COL) 
  
  END FUNCTION Indx_y_HD_Distrib_Start
  !----------------------------------------------------------------------------------------------------------------------------------
  !> This routine returns the starting index for the y_HD%Morison%LumpedMesh mesh in the FAST linearization outputs.
  FUNCTION Indx_y_HD_Lumped_Start(y_HD, y_FAST) RESULT(HD_Start)
     TYPE(FAST_OutputFileType),      INTENT(IN )  :: y_FAST           !< FAST output file data (for linearization)
     TYPE(HydroDyn_OutputType),      INTENT(IN )  :: y_HD             !< HD Outputs at t
  
     INTEGER                                      :: HD_Start         !< starting index of this mesh in HydroDyn Outputs
  
     HD_Start = Indx_y_HD_Distrib_Start(y_HD, y_FAST) 
     if (y_HD%Morison%DistribMesh%committed)  HD_Start =  HD_Start + y_HD%Morison%DistribMesh%NNodes * 6  ! 2 fields (MASKID_FORCE,MASKID_MOMENT) with 3 components
  
  END FUNCTION Indx_y_HD_Lumped_Start
  !----------------------------------------------------------------------------------------------------------------------------------
  !> This routine returns the starting index for the y_HD%Mesh mesh in the FAST linearization outputs.
  FUNCTION Indx_y_HD_PlatformRef_Start(y_HD, y_FAST) RESULT(HD_Start)
  
negative.code:    IF ( p_FAST%CompHydro == Module_HD ) THEN
        ThisModule = Module_HD
        if (allocated(y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_mag)) then
           ! TODO: WAMIT parameter and continuous states are now an arrays of length NBody, so we need to modify this following code to handle that
           ! We will try to loop over NBody and add each to the state array
           do iBody = 1, HD%p%NBody
              nStates = HD%p%WAMIT(iBody)%SS_Exctn%numStates
              if (nStates > 0) then
                 call GetStateAry(p_FAST, iMode, t, HD%x( STATE_CURR)%WAMIT(iBody)%SS_Exctn%x, y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_mag(         :nStates), y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_phase(         :nStates))
              end if
           end do
           do iBody = 1, HD%p%NBody
              nStates = HD%p%WAMIT(iBody)%SS_Rdtn%numStates
              if (nStates < size(y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_mag)) then
                 call GetStateAry(p_FAST, iMode, t, HD%x( STATE_CURR)%WAMIT(iBody)%SS_Rdtn%x,  y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_mag(1+nStates:       ), y_FAST%Lin%Modules(ThisModule)%Instance(1)%op_x_eig_phase(1+nStates:       ))
              end if
           end do
        end if
     END IF
              
  