anchor.diff:     END DO
      
   
  +!...........................
  +   
  +CALL AllocAry( HD_InitOutput%WriteOutputHdr, HD_Data%HDOut_Data%NumOuts, 'WriteOutputHdr', ErrStat2, ErrMsg2 )
  +CALL AllocAry( HD_InitOutput%WriteOutputUnt, HD_Data%HDOut_Data%NumOuts, 'WriteOutputUnt', ErrStat2, ErrMsg2 )
  +CALL AllocAry( HD_InitOutput%WriteOutput,    HD_Data%HDOut_Data%NumOuts, 'WriteOutput',    ErrStat2, ErrMsg2 )
  +  
  +HD_InitOutput%Ver = HD_Prog
  +HD_InitOutput%WriteOutputHdr = HD_Data%HDOut_Data%OutParam(1:HD_Data%HDOut_Data%NumOuts)%Name
  +HD_InitOutput%WriteOutputUnt = HD_Data%HDOut_Data%OutParam(1:HD_Data%HDOut_Data%NumOuts)%Units
      
   END SUBROUTINE HD_Init
   !====================================================================================================
  
positive.code:    PUBLIC                                       :: HD_Terminate               ! Subroutine to terminate module
     PUBLIC                                       :: HD_CheckLin                ! Function to determine if a linearization analysis can be performed with HydroDyn's settings
     
     
     PUBLIC                                       :: HD_GetUndisturbedWaveElev  ! Returns undisturbed wave elevation
     
  
negative.code:    ! calculate output as requested
     !-------------------------------------------------------------------------------------------------
        
     CALL HDOut_CalcOutput ( CurrentTime, HD_Data%HDOut_Data, HD_Data%FltPtfm_data, HD_Data%Waves_data,  ErrStat )   
     HD_Data%LastCalcTime = CurrentTime
  
     
     !bjj:
  
     DO I = 1,HD_Data%HDOut_Data%NumOuts
        HD_InitOutput%WriteOutput(I) = HD_Data%HDOut_Data%OutParam(I)%SignM * HD_Data%HDOut_Data%AllOuts( HD_Data%HDOut_Data%OutParam(I)%Indx )      
     END DO    
  
  END SUBROUTINE HD_CalculateLoads
  !====================================================================================================
  