From 26221e07196a641feec5d022a1f0ca0bf72b215e Mon Sep 17 00:00:00 2001 From: Zak Kipling <90766919+cxzk@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:54:43 +0000 Subject: [PATCH] Bugfix erroneous output in oops (#37) Co-authored-by: Jean Bidlot --- src/ecwam/outstep0.F90 | 5 +++++ src/ecwam/wavemdl.F90 | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ecwam/outstep0.F90 b/src/ecwam/outstep0.F90 index dced0a6f8..ee11031a6 100644 --- a/src/ecwam/outstep0.F90 +++ b/src/ecwam/outstep0.F90 @@ -43,6 +43,7 @@ SUBROUTINE OUTSTEP0 (WVENVI, WVPRPT, FF_NOW, INTFLDS, & USE YOWPARAM , ONLY : NANG ,NFRE ,LLUNSTR USE YOWSTAT , ONLY : CDTPRO ,CDTINTT ,IREST , MARSTYPE , & & LLSOURCE , LANAONLY ,LFRSTFLD + USE YOWTEST , ONLY : IU06 USE YOWTEXT , ONLY : LRESTARTED #ifdef WAM_HAVE_UNWAM USE UNWAM , ONLY : EXCHANGE_FOR_FL1 @@ -219,11 +220,15 @@ SUBROUTINE OUTSTEP0 (WVENVI, WVPRPT, FF_NOW, INTFLDS, & IF ( .NOT. LRESTARTED ) THEN IF (IREST == 1 .AND. MARSTYPE /= 'an' .AND. LGRIBOUT) THEN CALL OUTSPEC(FL1, FF_NOW) + WRITE(IU06,*) '' + WRITE(IU06,*) ' OUTSTEP0: OUTSPEC WAS CALLED !' LLFLUSH = .TRUE. ENDIF IF (NIPRMOUT > 0 ) THEN CALL OUTWINT(BOUTST0) + WRITE(IU06,*) '' + WRITE(IU06,*) ' OUTSTEP0: OUTWINT WAS CALLED !' LLFLUSH = .TRUE. ENDIF diff --git a/src/ecwam/wavemdl.F90 b/src/ecwam/wavemdl.F90 index 5ca6d01da..546820817 100644 --- a/src/ecwam/wavemdl.F90 +++ b/src/ecwam/wavemdl.F90 @@ -107,7 +107,7 @@ SUBROUTINE WAVEMDL (CBEGDAT, PSTEP, KSTOP, KSTPW, & USE PARKIND_WAVE, ONLY : JWIM, JWRB, JWRU - USE YOWCOUT , ONLY : CASS ,NASS + USE YOWCOUT , ONLY : CASS ,NASS, LWAMANOUT USE YOWCOUP , ONLY : LWCOU, LWCOU2W, LWCOUHMF, LWFLUX, & & LWCOUNORMS, LLNORMWAMOUT_GLOBAL, LLNORMWAM2IFS, & & KCOUSTEP, LMASK_OUT_NOT_SET, LMASK_TASK_STR, & @@ -1036,6 +1036,11 @@ SUBROUTINE WAVEMDL (CBEGDAT, PSTEP, KSTOP, KSTPW, & ! 4. END OF RUN ? ! ----------- IF (CDATEE == CDTPRO) THEN + IF(LWCOU) THEN + ! Prevent any further output until the namelist is read again. + LWAMANOUT = .FALSE. + WRITE(IU06,*) ' WAVEMDL: NORMAL END OF RUN. OUTPUT IS NOW DISABLED !' + ENDIF CALL MPL_BARRIER(CDSTRING='WAVEMDL: END') CALL FLUSH(IU06) ENDIF