Skip to content

Commit

Permalink
Removed unnecessary reduction from stresso, wnfluxes
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed Mar 19, 2024
1 parent c643191 commit 8f4a242
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ecwam/stresso.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ SUBROUTINE STRESSO (KIJS, KIJL, MIJ, RHOWGDFTH, &

!* CALCULATE LOW-FREQUENCY CONTRIBUTION TO STRESS AND ENERGY FLUX (positive sinput).
! ---------------------------------------------------------------------------------
DO M=1,MAXVAL(MIJ(:))
DO M=1,NFRE
! THE INTEGRATION ONLY UP TO FR=MIJ SINCE RHOWGDFTH=0 FOR FR>MIJ
K=1
DO IJ=KIJS,KIJL
Expand All @@ -172,7 +172,7 @@ SUBROUTINE STRESSO (KIJS, KIJL, MIJ, RHOWGDFTH, &
ENDDO

IF ( LLPHIWA ) THEN
DO M=1,MAXVAL(MIJ(:))
DO M=1,NFRE
! THE INTEGRATION ONLY UP TO FR=MIJ SINCE RHOWGDFTH=0 FOR FR>MIJ
K=1
DO IJ=KIJS,KIJL
Expand Down
10 changes: 1 addition & 9 deletions src/ecwam/wnfluxes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@ SUBROUTINE WNFLUXES (KIJS, KIJL, &
EFD_FAC = 4.0_JWRB*EGRCRV/G**2
FFD_FAC = (EGRCRV/AFCRV)**(1.0_JWRB/BFCRV) * G

!$loki separator
MAXIJ = -1
!$loki vector-reduction(max: maxij)
DO IJ=KIJS,KIJL
MAXIJ = MAX(MAXIJ, MIJ(IJ))
ENDDO
!$loki end vector-reduction(max: maxij)

!* DETERMINE NORMALIZED FLUXES FROM AIR TO WAVE AND FROM WAVE TO OCEAN.
! -------------------------------------------------------------------

Expand All @@ -164,7 +156,7 @@ SUBROUTINE WNFLUXES (KIJS, KIJL, &
ENDDO

! THE INTEGRATION ONLY UP TO FR=MIJ
DO M=1,MAXVAL(MIJ(:))
DO M=1,NFRE
K=1
DO IJ=KIJS,KIJL
SUMT(IJ) = SSURF(IJ,K,M)
Expand Down

0 comments on commit 8f4a242

Please sign in to comment.