From e0032e6a32edc47219e7502be30c869613fc16f9 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Wed, 27 Nov 2024 18:43:44 -0700 Subject: [PATCH] Remove extra GetNewUnit calls from AWAE --- modules/awae/src/AWAE_Driver_Subs.f90 | 18 +++--------------- modules/awae/src/AWAE_IO.f90 | 15 ++------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/modules/awae/src/AWAE_Driver_Subs.f90 b/modules/awae/src/AWAE_Driver_Subs.f90 index 24bcc165b8..024fdae6b6 100644 --- a/modules/awae/src/AWAE_Driver_Subs.f90 +++ b/modules/awae/src/AWAE_Driver_Subs.f90 @@ -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 @@ -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 @@ -487,4 +475,4 @@ end subroutine AWAE_Dvr_Init end module AWAE_Driver_Subs - \ No newline at end of file + diff --git a/modules/awae/src/AWAE_IO.f90 b/modules/awae/src/AWAE_IO.f90 index 5d89f40978..1fd51ec950 100644 --- a/modules/awae/src/AWAE_IO.f90 +++ b/modules/awae/src/AWAE_IO.f90 @@ -522,24 +522,18 @@ 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 @@ -547,15 +541,10 @@ SUBROUTINE AWAE_PrintSum( p, u, y, ErrStat, ErrMsg ) 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 !----------------------------------------------------------------------------------------------------------------------------------