Skip to content

Commit

Permalink
Remove extra GetNewUnit calls from AWAE
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Nov 28, 2024
1 parent 981512c commit e0032e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
18 changes: 3 additions & 15 deletions modules/awae/src/AWAE_Driver_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ module AWAE_Driver_Subs
! call GetPath( filename, PriPath ) ! Input files will be relative to the path where the driver input file is located.
!
!
! ! Get an available unit number for the file.
!
! call GetNewUnit( UnIn, errStat2, errMsg2 )
! call SetErrStat( errStat2, errMsg2, ErrStat, ErrMsg, RoutineName )
!
! ! Open the driver input file.
!
! ! Open the driver input file.
! call OpenFInpFile ( UnIn, filename, errStat2, errMsg2 )
! call SetErrStat( errStat2, errMsg2, ErrStat, ErrMsg, RoutineName )
! if ( ErrStat >= AbortErrLev ) then
Expand Down Expand Up @@ -294,13 +288,7 @@ module AWAE_Driver_Subs
! !call AllocAry( InputFileData%OutList, MaxOutPts, "Outlist", errStat2, errMsg2 )
! ! call SetErrStat( errStat2, errMsg2, ErrStat, ErrMsg, RoutineName )
!
! ! Get an available unit number for the file.
!
! call GetNewUnit( UnIn, errStat2, errMsg2 )
! call SetErrStat( errStat2, errMsg2, ErrStat, ErrMsg, RoutineName )
!
! ! Open the Primary input file.
!
! ! Open the Primary input file.
! call OpenFInpFile ( UnIn, InputFile, errStat2, errMsg2 )
! call SetErrStat( errStat2, errMsg2, ErrStat, ErrMsg, RoutineName )
! if ( ErrStat >= AbortErrLev ) then
Expand Down Expand Up @@ -487,4 +475,4 @@ end subroutine AWAE_Dvr_Init


end module AWAE_Driver_Subs


15 changes: 2 additions & 13 deletions modules/awae/src/AWAE_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -522,40 +522,29 @@ end subroutine AWAE_IO_InitGridInfo
!----------------------------------------------------------------------------------------------------------------------------------
SUBROUTINE AWAE_PrintSum( p, u, y, ErrStat, ErrMsg )
! This routine generates the summary file, which contains a summary of input file options.

! passed variables
!TYPE(AWAE_InitInput), INTENT(IN) :: InputFileData ! Input-file data
type(AWAE_ParameterType), intent(in) :: p ! Parameters
type(AWAE_InputType), intent(in) :: u ! inputs
type(AWAE_OutputType), intent(in) :: y ! outputs
integer(IntKi), intent(out) :: ErrStat
character(*), intent(out) :: ErrMsg
integer(IntKi), intent(out) :: ErrStat
character(*), intent(out) :: ErrMsg


! Local variables.

INTEGER(IntKi) :: I ! Index for the nodes.
INTEGER(IntKi) :: UnSu ! I/O unit number for the summary output file

CHARACTER(*), PARAMETER :: FmtDat = '(A,T35,1(:,F13.3))' ! Format for outputting mass and modal data.
CHARACTER(*), PARAMETER :: FmtDatT = '(A,T35,1(:,F13.8))' ! Format for outputting time steps.

CHARACTER(30) :: OutPFmt ! Format to print list of selected output channels to summary file
CHARACTER(100) :: Msg ! temporary string for writing appropriate text to summary file

errStat = ErrID_None
errMsg = ""

! Open the summary file and give it a heading.

CALL GetNewUnit( UnSu, ErrStat, ErrMsg )
CALL OpenFOutFile ( UnSu, TRIM( p%OutFileRoot )//'.sum', ErrStat, ErrMsg )
IF ( ErrStat >= AbortErrLev ) RETURN



CLOSE(UnSu)

RETURN
END SUBROUTINE AWAE_PrintSum
!----------------------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit e0032e6

Please sign in to comment.