anchor.diff:     m_FAST%NextJacCalcTime = m_FAST%t_global                             ! We want to calculate the Jacobian on the first step
      
      
  -      ! ... Initialize NWTC Library (open console, set pi constants) ...
  -   CALL NWTC_Init( ProgNameIN=FAST_ver%Name, EchoLibVer=.FALSE. )       ! sets the pi constants, open console for output, etc...
  -
  -   
  -      ! set turbine reference position for graphics output
  +      ! Init NWTC_Library, display copyright and version information:
  +   CALL FAST_ProgStart( FAST_Ver )
  +   !call DispNVD( FAST_Ver )
  +
  +   
  +   IF (PRESENT(InFile)) THEN
  +      p_FAST%UseDWM = .FALSE.
  +      InputFile = InFile
  +   ELSE
  +      CALL GetInputFileName(InputFile,p_FAST%UseDWM,ErrStat2,ErrMsg2)            
  +         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +         IF (ErrStat >= AbortErrLev) THEN
  +            CALL Cleanup()
  +            RETURN
  +         END IF
  +   END IF
  +   
  +   ! ... Open and read input files ...
  +   ! also, set turbine reference position for graphics output
      if (PRESENT(ExternInitData)) then
         p_FAST%TurbinePos = ExternInitData%TurbinePos
  +      CALL FAST_Init( p_FAST, y_FAST, t_initial, InputFile, ErrStat2, ErrMsg2, ExternInitData%TMax, ExternInitData%TurbineID )  ! We have the name of the input file and the simulation length from somewhere else (e.g. Simulink)         
      else
         p_FAST%TurbinePos = 0.0_ReKi
  +      CALL FAST_Init( p_FAST, y_FAST, t_initial, InputFile, ErrStat2, ErrMsg2 )                       ! We have the name of the input file from somewhere else (e.g. Simulink)
      end if
  -   
  -   
  -      ! ... Open and read input files, initialize global parameters. ...
  -   IF (PRESENT(InFile)) THEN
  -      IF (PRESENT(ExternInitData)) THEN
  -         CALL FAST_Init( p_FAST, y_FAST, t_initial, ErrStat2, ErrMsg2, InFile, ExternInitData%TMax, ExternInitData%TurbineID )  ! We have the name of the input file and the simulation length from somewhere else (e.g. Simulink)         
  -      ELSE         
  -         CALL FAST_Init( p_FAST, y_FAST, t_initial, ErrStat2, ErrMsg2, InFile )                       ! We have the name of the input file from somewhere else (e.g. Simulink)
  -      END IF
  -   ELSE
  -      CALL FAST_Init( p_FAST, y_FAST, t_initial, ErrStat2, ErrMsg2 )
  -   END IF
  -   
  +         
      CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      IF (ErrStat >= AbortErrLev) THEN
         CALL Cleanup()
  
positive.code:    ErrStat = ErrID_None
     ErrMsg  = ""
     
        ! Display the copyright notice
     CALL DispCopyrightLicense( FAST_Ver )
  
        ! Tell our users what they're running
     CALL WrScr( ' Running '//GetVersion()//NewLine//' linked with '//TRIM( GetNVD( NWTC_Ver ))//NewLine )
     
     Unit = -1         
     DO i_turb = 1,NumTurbines
        CALL FAST_RestoreFromCheckpoint_T(t_initial_out, n_t_global, NumTurbines_out, Turbine(i_turb), CheckpointRoot, ErrStat2, ErrMsg2, Unit )
  
negative.code:    REAL(DbKi),               INTENT(IN)            :: t_initial         !< the beginning time of the simulation
     INTEGER(IntKi),           INTENT(OUT)           :: ErrStat           !< Error status
     CHARACTER(*),             INTENT(OUT)           :: ErrMsg            !< Error message
     CHARACTER(*),             INTENT(IN)            :: InputFile         !< A CHARACTER string containing the name of the primary FAST input file (if not present, we'll get it from the command line)
     REAL(DbKi),               INTENT(IN), OPTIONAL  :: TMax              !< the length of the simulation (from Simulink)
     INTEGER(IntKi),           INTENT(IN), OPTIONAL  :: TurbID            !< an ID for naming the tubine output file
        ! Local variables
  
     INTEGER                      :: i                                    ! loop counter
     !CHARACTER(1024)              :: DirName                              ! A CHARACTER string containing the path of the current working directory
  
  
     CHARACTER(*), PARAMETER      :: RoutineName = "FAST_Init"
  