anchor.diff:           
         END IF
      END IF
  -   
  +
  +   ! Setup mesh mapping for Morison motion
  +   IF ( drvrInitInp%MorisonInputsMod == 2 ) THEN
  +      IF ( u(1)%Morison%DistribMesh%Initialized ) THEN
  +         ! create mapping from PMesh (used for WAMIT mesh among others) to Morison.  This will be used to map the motions for Morison timeseries inputs
  +         CALL MeshMapCreate( PMesh, u(1)%Morison%DistribMesh, Map_P_to_MorisonDist, ErrStat, ErrMsg )
  +         if (errStat >= AbortErrLev) call HD_DvrCleanup()
  +      ENDIF
  +      IF ( u(1)%Morison%LumpedMesh%Initialized ) THEN
  +         ! create mapping from PMesh (used for WAMIT mesh among others) to Morison.  This will be used to map the motions for Morison timeseries inputs
  +         CALL MeshMapCreate( PMesh, u(1)%Morison%LumpedMesh, Map_P_to_MorisonLumped, ErrStat, ErrMsg )
  +         if (errStat >= AbortErrLev) call HD_DvrCleanup()
  +      ENDIF
  +   ENDIF
         
      !...............................................................................................................................
      ! Routines called in loose coupling -- the glue code may implement this in various ways
  
positive.code:    INTEGER(IntKi)                                     :: UnHD_Out              ! Output file identifier
     REAL(ReKi), ALLOCATABLE                            :: WAMITin(:,:)          ! Variable for storing time, forces, and body velocities, in m/s or rad/s for WAMIT
     REAL(ReKi), ALLOCATABLE                            :: Morisonin(:,:)        ! Variable for storing time, forces, and body velocities, in m/s or rad/s for Morison elements
     
     INTEGER(IntKi)                                     :: I                    ! Generic loop counter
     INTEGER(IntKi)                                     :: J                    ! Generic loop counter
     INTEGER(IntKi)                                     :: n                    ! Loop counter (for time step)
  
negative.code:    ENDIF
  
  
        ! Setup mesh for input motions for Morison and WAMIT
     CALL MeshCreate( BlankMesh       = PMesh             &
                   ,IOS               = COMPONENT_INPUT   &
                   ,Nnodes            = 1                 &
                   ,ErrStat           = ErrStat           &
                   ,ErrMess           = ErrMsg            &
                   ,TranslationDisp   = .TRUE.            &
                   ,Orientation       = .TRUE.            &
                   ,TranslationVel    = .TRUE.            &
                   ,RotationVel       = .TRUE.            &
                   ,TranslationAcc    = .TRUE.            &
                   ,RotationAcc       = .TRUE.)
     IF ( ErrStat >= ErrID_Fatal ) THEN
        CALL WrScr( ErrMsg )
        STOP
     END IF
  
     CALL MeshPositionNode (PMesh                                 &
                             , 1                                  &
                             , (/0.0_ReKi, 0.0_ReKi, 0.0_ReKi/)   &
                             , ErrStat                            &
                             , ErrMsg                             )
     IF ( ErrStat >= ErrID_Fatal ) THEN
        CALL WrScr( ErrMsg )
        STOP
     END IF
  
     CALL MeshConstructElement( PMesh, ELEMENT_POINT, ErrStat, ErrMsg, 1 )
     IF ( ErrStat >= ErrID_Fatal ) THEN
        CALL WrScr( ErrMsg )
        STOP
     END IF
  
     CALL MeshCommit ( PMesh, ErrStat, ErrMsg )
     IF ( ErrStat >= ErrID_Fatal ) THEN
        CALL WrScr( ErrMsg )
        STOP
     END IF
  
  
  
           ! Initialize the module
     Interval = drvrInitInp%TimeInterval
  