anchor.diff:              IF (I < 4 ) THEN
                 
                 
  -               m%F_D_End(i,j) =  p%An_End(i,j)*p%DragConst_End(j)*abs(vmag)*vmag
  +               m%F_D_End(i,j) =  p%An_End(i,j)*p%DragConst_End(j)*abs(vmag)*vmag  ! Note: vmag is zero if node is not in the water
                  !TODO: This needs to be reworked with new equations
                  !m%F_B_End(I,J) =  m%nodeInWater(j)*p%F_B_End(I,J)
  -               !y%Mesh%Force(I,J) = m%F_A_End(I,J) + m%F_D_End(I,J) +  m%F_B_End(I,J) + m%F_I_End(I,J)  !+  m%F_BF_End(I,J)
                  y%Mesh%Force(i,j) = m%F_D_End(i,j) + m%F_I_End(i,j) + p%F_WMG_End(i,j) + m%F_B_End(i,j) + m%F_BF_End(i,j) + m%F_A_End(i,j) + m%F_IMG_End(i,j)
               ELSE
                  !m%F_B_End(I,J) =  m%nodeInWater(j)*p%F_B_End(I,J)
  -               !y%Mesh%Moment(I-3,J) =   m%F_A_End(I,J) + m%F_B_End(I,J) ! +   m%F_BF_End(I,J)
  -                y%Mesh%Moment(i-3,j) = m%F_B_End(i,j) + m%F_BF_End(i,j)  + m%F_IMG_End(i,j)
  +               y%Mesh%Moment(i-3,j) = m%F_B_End(i,j) + m%F_BF_End(i,j)  + m%F_IMG_End(i,j)
               END IF
            END DO      ! I=1,6
         ENDDO          ! J = 1, p%NJoints
  
positive.code:          p%I_MG_End(:,:,i) = MatMul( MatMul(R_I, Irl_mat), Transpose(R_I) ) ! final moment of inertia matrix for node
           
  
        END IF  ! nodes(I)%Position(3) >= z0
     
     END DO ! looping through nodes that are joints, i
            
  
negative.code:       I_n       = 0.0
        MGdens    = 0.0
        tMG       = -999.0
        An_drag   = 0.0
        
        IF ( InitInp%InpJoints(i)%Position(3) >= -p%WtrDpth ) THEN
     
           ! loop through each member attached to the joint, getting the radius of its appropriate end
  