anchor.diff:      INTEGER(IntKi)  :: NBody      !< Number of WAMIT bodies for this State Space model [-]
       REAL(ReKi)  :: WaveDir      !< Wave direction [rad]
       INTEGER(IntKi)  :: NStepWave      !< Number of timesteps in the WaveTime array [-]
  -    REAL(ReKi) , DIMENSION(:), ALLOCATABLE  :: PtfmRefxt      !< The xt offset of the body reference point(s) from (0,0,0)  [1 to NBody; only used when PotMod=1 ] [(m)]
  -    REAL(ReKi) , DIMENSION(:), ALLOCATABLE  :: PtfmRefyt      !< The yt offset of the body reference point(s) from (0,0,0)  [1 to NBody; only used when PotMod=1 ] [(m)]
       REAL(R8Ki) , DIMENSION(:), ALLOCATABLE  :: PtfmRefztRot      !< The rotation about zt of the body reference frame(s) from xt/yt [radians]
       REAL(SiKi) , DIMENSION(:), ALLOCATABLE  :: WaveElev0      !< Wave elevation time history at origin [m]
       REAL(SiKi) , DIMENSION(:), ALLOCATABLE  :: WaveTime      !< Times where wave elevation is known [s]
  
positive.code:       Re_Xferred   = Re_Xferred + 1
        OutData%NStepWave = IntKiBuf( Int_Xferred ) 
        Int_Xferred   = Int_Xferred + 1
    IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN  ! PtfmRefxt not allocated
      Int_Xferred = Int_Xferred + 1
    ELSE
      Int_Xferred = Int_Xferred + 1
      i1_l = IntKiBuf( Int_Xferred    )
      i1_u = IntKiBuf( Int_Xferred + 1)
      Int_Xferred = Int_Xferred + 2
      IF (ALLOCATED(OutData%PtfmRefxt)) DEALLOCATE(OutData%PtfmRefxt)
      ALLOCATE(OutData%PtfmRefxt(i1_l:i1_u),STAT=ErrStat2)
      IF (ErrStat2 /= 0) THEN 
         CALL SetErrStat(ErrID_Fatal, 'Error allocating OutData%PtfmRefxt.', ErrStat, ErrMsg,RoutineName)
         RETURN
      END IF
      ALLOCATE(mask1(i1_l:i1_u),STAT=ErrStat2)
      IF (ErrStat2 /= 0) THEN 
         CALL SetErrStat(ErrID_Fatal, 'Error allocating mask1.', ErrStat, ErrMsg,RoutineName)
         RETURN
      END IF
      mask1 = .TRUE. 
        IF (SIZE(OutData%PtfmRefxt)>0) OutData%PtfmRefxt = UNPACK(ReKiBuf( Re_Xferred:Re_Xferred+(SIZE(OutData%PtfmRefxt))-1 ), mask1, 0.0_ReKi )
        Re_Xferred   = Re_Xferred   + SIZE(OutData%PtfmRefxt)
      DEALLOCATE(mask1)
    END IF
    IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN  ! PtfmRefyt not allocated
      Int_Xferred = Int_Xferred + 1
    ELSE
      Int_Xferred = Int_Xferred + 1
      i1_l = IntKiBuf( Int_Xferred    )
      i1_u = IntKiBuf( Int_Xferred + 1)
      Int_Xferred = Int_Xferred + 2
      IF (ALLOCATED(OutData%PtfmRefyt)) DEALLOCATE(OutData%PtfmRefyt)
      ALLOCATE(OutData%PtfmRefyt(i1_l:i1_u),STAT=ErrStat2)
      IF (ErrStat2 /= 0) THEN 
         CALL SetErrStat(ErrID_Fatal, 'Error allocating OutData%PtfmRefyt.', ErrStat, ErrMsg,RoutineName)
         RETURN
      END IF
      ALLOCATE(mask1(i1_l:i1_u),STAT=ErrStat2)
      IF (ErrStat2 /= 0) THEN 
         CALL SetErrStat(ErrID_Fatal, 'Error allocating mask1.', ErrStat, ErrMsg,RoutineName)
         RETURN
      END IF
      mask1 = .TRUE. 
        IF (SIZE(OutData%PtfmRefyt)>0) OutData%PtfmRefyt = UNPACK(ReKiBuf( Re_Xferred:Re_Xferred+(SIZE(OutData%PtfmRefyt))-1 ), mask1, 0.0_ReKi )
        Re_Xferred   = Re_Xferred   + SIZE(OutData%PtfmRefyt)
      DEALLOCATE(mask1)
    END IF
    IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN  ! PtfmRefztRot not allocated
      Int_Xferred = Int_Xferred + 1
    ELSE
  
negative.code: ! 
    ErrStat = ErrID_None
    ErrMsg  = ""
  IF (ALLOCATED(InitInputData%PtfmRefztRot)) THEN
    DEALLOCATE(InitInputData%PtfmRefztRot)
  ENDIF
  