anchor.diff:        
      if (n > p%WAMIT%SS_Exctn%N) then
         indx = n - p%WAMIT%SS_Exctn%N
  -      x%WAMIT%SS_Rdtn%x( indx ) = x%WAMIT%SS_Rdtn%x( indx ) + p%dx(n) * perturb_sign 
  +      x%WAMIT%SS_Rdtn%x( indx ) = x%WAMIT%SS_Rdtn%x( indx ) + dx * perturb_sign 
      else
         indx = n
  -      x%WAMIT%SS_Exctn%x( indx ) = x%WAMIT%SS_Exctn%x( indx ) + p%dx(n) * perturb_sign 
  +      x%WAMIT%SS_Exctn%x( indx ) = x%WAMIT%SS_Exctn%x( indx ) + dx * perturb_sign 
      end if
                                                   
      END SUBROUTINE HD_Perturb_x
  
positive.code:          
           
        do i=1,NN
           
              ! get x_op + delta x
           call HydroDyn_CopyContState( x, x_perturb, MESH_UPDATECOPY, ErrStat2, ErrMsg2 )
              call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) ! we shouldn't have any errors about allocating memory here so I'm not going to return-on-error until later            
  
negative.code:    if ( allocated(InitOut%DerivOrder_x) ) InitOut%DerivOrder_x = 1
     
     ! set perturbation sizes: p%dx
     
     do i = 1, p%WAMIT%SS_Exctn%N    
        p%dx(i)  = 20000.0_R8Ki * D2R_D 
     end do
     
     do i = 1, p%WAMIT%SS_Rdtn%N
        p%dx(i+p%WAMIT%SS_Exctn%N)  = 2.0_R8Ki * D2R_D 
     end do
     
     modLabels = (/'Exctn     ','Rdtn      '/)
     dofLabels = (/'PtfmSg    ','PtfmSw    ','PtfmHv    ','PtfmR     ','PtfmP     ','PtfmY     '/)
     
        ! set linearization state names:
     do k = 1, 2   ! 1 = Excitation,  2 = Radiation
        if (k == 2) spdof = p%WAMIT%SS_Rdtn%N  / 6
          
        do j = 1, 6
  