@@ -9962,16 +9962,14 @@ SUBROUTINE FAST_CreateCheckpoint_T(t_initial, n_t_global, NumTurbines, Turbine,
9962
9962
9963
9963
IF ( unOut < 0 ) THEN
9964
9964
9965
- CALL GetNewUnit( unOut, ErrStat2, ErrMsg2 )
9966
- CALL OpenBOutFile ( unOut, FileName, ErrStat2, ErrMsg2)
9967
- CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
9968
- if (ErrStat >= AbortErrLev ) then
9969
-
9965
+ CALL GetNewUnit(unOut, ErrStat2, ErrMsg2)
9966
+ CALL OpenBOutFile (unOut, FileName, ErrStat2, ErrMsg2)
9967
+ CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
9968
+ if (ErrStat >= AbortErrLev) then
9970
9969
IF (.NOT. PRESENT(Unit)) THEN
9971
9970
CLOSE(unOut)
9972
9971
unOut = -1
9973
9972
end if
9974
- call cleanup()
9975
9973
return
9976
9974
end if
9977
9975
@@ -9985,20 +9983,15 @@ SUBROUTINE FAST_CreateCheckpoint_T(t_initial, n_t_global, NumTurbines, Turbine,
9985
9983
9986
9984
! Initialize the registry file
9987
9985
call InitRegFile(RF, unOut, ErrStat2, ErrMsg2)
9988
- call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
9986
+ call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
9989
9987
if (ErrStat >= AbortErrLev) return
9990
9988
9991
9989
! Pack data into the registry file
9992
9990
call FAST_PackTurbineType(RF, Turbine)
9993
- call SetErrStat(RF%ErrStat, RF%ErrMsg, ErrStat, ErrMsg, RoutineName )
9994
- if (ErrStat >= AbortErrLev ) then
9995
- call cleanup()
9996
- return
9997
- end if
9998
9991
9999
- ! Close registry file
9992
+ ! Close registry file and get any errors that occurred while writing
10000
9993
call CloseRegFile(RF, ErrStat2, ErrMsg2)
10001
- call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
9994
+ call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
10002
9995
if (ErrStat >= AbortErrLev) return
10003
9996
10004
9997
! If last turbine or no unit, close output unit
@@ -10030,13 +10023,6 @@ SUBROUTINE FAST_CreateCheckpoint_T(t_initial, n_t_global, NumTurbines, Turbine,
10030
10023
Turbine%SrvD%m%dll_data%SimStatus = Turbine%SrvD%m%dll_data%avrSWAP( 1)
10031
10024
end if
10032
10025
END IF
10033
-
10034
- call cleanup()
10035
-
10036
- contains
10037
- subroutine cleanup()
10038
- call CloseRegFile(RF, ErrStat2, ErrMsg2)
10039
- end subroutine cleanup
10040
10026
10041
10027
END SUBROUTINE FAST_CreateCheckpoint_T
10042
10028
!----------------------------------------------------------------------------------------------------------------------------------
0 commit comments