diff --git a/src/ecwam/userin.F90 b/src/ecwam/userin.F90 index a9bed51b..15a5f905 100644 --- a/src/ecwam/userin.F90 +++ b/src/ecwam/userin.F90 @@ -1590,6 +1590,18 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '+ PROGRAM WILL IGNORE THIS OUTPUT TIME +' WRITE(IU06,*) '+ +' WRITE(IU06,*) '++++++++++++++++++++++++++++++++++++++++' + ELSE IF (MOD(ISHIFT,IDELT) /= 0 .AND. LLSOURCE ) THEN + WRITE(IU06,*) '++++++++++++++++++++++++++++++++++++++++' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+ WARNING ERROR IN SUB. USERIN +' + WRITE(IU06,*) '+ ============================ +' + WRITE(IU06,*) '+ OUTPUT DATE IS NOT AT THE END OF A +' + WRITE(IU06,*) '+ SOURCE TERM TIMESTEP IDELT= ', IDELT + WRITE(IU06,*) '+ DATE IS : ', COUTT(J) + WRITE(IU06,*) '+ PROGRAM WILL ABORT ' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' + LERROR = .TRUE. ENDIF ENDDO ELSE @@ -1611,7 +1623,7 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '* *' WRITE(IU06,*) '* FATAL ERROR IN SUB. USERIN *' WRITE(IU06,*) '* ========================== *' - WRITE(IU06,*) '* OUTPUT OF INTEGRATED DATA (TOTAL SEA) *' + WRITE(IU06,*) '* OUTPUT OF INTEGRATED DATA *' WRITE(IU06,*) '* IS REQUESTED. *' WRITE(IU06,*) '* OUTPUT TIME STEP HAS TO BE A MULTIPLE *' WRITE(IU06,*) '* OF THE PROPAGATION TIME STEP. *' @@ -1621,6 +1633,23 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '*******************************************' LERROR = .TRUE. ENDIF + IF (LLSOURCE) THEN + IF ((FFLAG20 .OR. GFLAG20) .AND. MOD(IDELINT,IDELT) /= 0) THEN + WRITE(IU06,*) '*******************************************' + WRITE(IU06,*) '* *' + WRITE(IU06,*) '* FATAL ERROR IN SUB. USERIN *' + WRITE(IU06,*) '* ========================== *' + WRITE(IU06,*) '* OUTPUT OF INTEGRATED DATA *' + WRITE(IU06,*) '* IS REQUESTED. *' + WRITE(IU06,*) '* OUTPUT TIME STEP HAS TO BE A MULTIPLE *' + WRITE(IU06,*) '* OF THE SOURCE TERM TIME STEP. *' + WRITE(IU06,*) '* OUTPUT TIME STEP IS IDELINT = ', IDELINT + WRITE(IU06,*) '* SOURCE TERM TIME STEP IS IDELT = ', IDELT + WRITE(IU06,*) '* *' + WRITE(IU06,*) '*******************************************' + LERROR = .TRUE. + ENDIF + ENDIF ENDIF IF (NOUTS > 0) THEN @@ -1639,6 +1668,24 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' ENDIF ENDDO + IF (LLSOURCE) THEN + DO J=1,NOUTS + CALL DIFDATE (CDATEA, COUTS(J), ISHIFT) + IF (ISHIFT <= 0 .OR. MOD(ISHIFT,IDELT) /= 0) THEN + WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+ WARNING ERROR IN SUB. USERIN +' + WRITE(IU06,*) '+ ============================ +' + WRITE(IU06,*) '+ SPECTRA OUTPUT DATE IS NOT AT THE END +' + WRITE(IU06,*) '+ OF A SOURCE TERM TIMESTEP IDELT= ', IDELT + WRITE(IU06,*) '+ DATE IS : ', COUTS(J) + WRITE(IU06,*) '+ PROGRAM WILL ABORT ' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' + LERROR = .TRUE. + ENDIF + ENDDO + ENDIF ENDIF IF (NASS > 0 .AND. IASSI == 1) THEN @@ -1655,7 +1702,23 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '+ PROGRAM WILL ABORT ' WRITE(IU06,*) '+ +' WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' - CALL WAM_ABORT(__FILENAME__,__LINE__) + LERROR = .TRUE. + ENDIF + ENDDO + DO J=1,NASS + CALL DIFDATE (CDATEA, CASS(J), ISHIFT) + IF (ISHIFT <= 0 .OR. MOD(ISHIFT,IDELT) /= 0) THEN + WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+ WARNING ERROR IN SUB. USERIN +' + WRITE(IU06,*) '+ ============================ +' + WRITE(IU06,*) '+ ASSIMILATION DATE IS NOT AT THE END +' + WRITE(IU06,*) '+ OF A SOURCE TERM TIMESTEP IDELT= ', IDELT + WRITE(IU06,*) '+ DATE IS : ', CASS(J) + WRITE(IU06,*) '+ PROGRAM WILL ABORT ' + WRITE(IU06,*) '+ +' + WRITE(IU06,*) '+++++++++++++++++++++++++++++++++++++++++' + LERROR = .TRUE. ENDIF ENDDO ENDIF @@ -1677,6 +1740,10 @@ SUBROUTINE USERIN (IFORCA, LWCUR) WRITE(IU06,*) '* PROGRAM ABORTS. PROGRAM ABORTS. *' WRITE(IU06,*) '* --------------- -------------- *' WRITE(IU06,*) '*******************************************' + WRITE(NULERR,*) '*******************************************' + WRITE(NULERR,*) '* FATAL ERROR(S) IN SUB. USERIN *' + WRITE(NULERR,*) '* SEE LOGFILE *' + WRITE(NULERR,*) '*******************************************' CALL WAM_ABORT(__FILENAME__,__LINE__) ELSE diff --git a/src/ecwam/wamintgr.F90 b/src/ecwam/wamintgr.F90 index 6d429226..8fd4b2af 100644 --- a/src/ecwam/wamintgr.F90 +++ b/src/ecwam/wamintgr.F90 @@ -172,6 +172,14 @@ SUBROUTINE WAMINTGR (CDTPRA, CDATE, CDATEWH, CDTIMP, CDTIMPNEXT, & CDTIMP=CDTIMPNEXT CALL INCDATE(CDTIMPNEXT, IDELT) +ELSE +! NO SOURCE TERM CONTRIBUTION +!$OMP PARALLEL DO SCHEDULE(STATIC) PRIVATE(ICHNK) + DO ICHNK = 1, NCHNK + MIJ(:,ICHNK) = NFRE + XLLWS(:,:,:,ICHNK) = 0.0_JWRB + ENDDO +!$OMP END PARALLEL DO ENDIF IF (LHOOK) CALL DR_HOOK('WAMINTGR',1,ZHOOK_HANDLE)