Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port forward IFS-3869 changes from IFS CY49R1 for use in IFS "develop" #54

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 69 additions & 2 deletions src/ecwam/userin.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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. *'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
8 changes: 8 additions & 0 deletions src/ecwam/wamintgr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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%PTR(:,ICHNK) = NFRE
VARS_4D%XLLWS(:,:,:,ICHNK) = 0.0_JWRB
ENDDO
!$OMP END PARALLEL DO
ENDIF

IF (LHOOK) CALL DR_HOOK('WAMINTGR',1,ZHOOK_HANDLE)
Expand Down
Loading