Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4c36a6

Browse files
committed
Fix openmp test by adding Stokes_VT to shr clause
in MOM_CoriolisAdv. Also remove the Passive_Stokes_VF block since it's never set to true.
1 parent e2ab77e commit d4c36a6

1 file changed

Lines changed: 12 additions & 18 deletions

File tree

src/core/MOM_CoriolisAdv.F90

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, Waves)
228228
real :: UHeff, VHeff ! More temporary variables [H L2 T-1 ~> m3 s-1 or kg s-1].
229229
real :: QUHeff,QVHeff ! More temporary variables [H L2 T-1 s-1 ~> m3 s-2 or kg s-2].
230230
integer :: i, j, k, n, is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
231-
logical :: Stokes_VF, Passive_Stokes_VF
231+
logical :: Stokes_VF
232232

233233
! Diagnostics for fractional thickness-weighted terms
234234
real, allocatable, dimension(:,:) :: &
@@ -293,12 +293,13 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, Waves)
293293
(Area_h(i+1,j) + Area_h(i,j+1))
294294
enddo ; enddo
295295

296-
Stokes_VF = present(Waves)
297-
if (Stokes_VF) Stokes_VF = associated(Waves)
298-
if (Stokes_VF) Stokes_VF = Waves%Stokes_VF
296+
Stokes_VF = .false.
297+
if (present(Waves)) then ; if (associated(Waves)) then
298+
Stokes_VF = Waves%Stokes_VF
299+
endif ; endif
299300

300301
!$OMP parallel do default(private) shared(u,v,h,uh,vh,CAu,CAv,G,GV,CS,AD,Area_h,Area_q,&
301-
!$OMP RV,PV,is,ie,js,je,Isq,Ieq,Jsq,Jeq,nz,vol_neglect,h_tiny,OBC,eps_vel)
302+
!$OMP RV,PV,is,ie,js,je,Isq,Ieq,Jsq,Jeq,nz,vol_neglect,h_tiny,OBC,eps_vel,Stokes_VF)
302303
do k=1,nz
303304

304305
! Here the second order accurate layer potential vorticities, q,
@@ -315,19 +316,12 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, Waves)
315316
(-Waves%us_x(I,j,k))*G%dxCu(I,j))
316317
enddo; enddo
317318
endif
318-
if (Passive_Stokes_VF) then
319-
do J=Jsq-1,Jeq+1 ; do I=Isq-1,Ieq+1
320-
dvdx(I,J) = (v(i+1,J,k)*G%dyCv(i+1,J) - v(i,J,k)*G%dyCv(i,J))
321-
dudy(I,J) = (u(I,j+1,k)*G%dxCu(I,j+1) - u(I,j,k)*G%dxCu(I,j))
322-
enddo; enddo
323-
else
324-
do J=Jsq-1,Jeq+1 ; do I=Isq-1,Ieq+1
325-
dvdx(I,J) = ((v(i+1,J,k)-Waves%us_y(i+1,J,k))*G%dyCv(i+1,J) - &
326-
(v(i,J,k)-Waves%us_y(i,J,k))*G%dyCv(i,J))
327-
dudy(I,J) = ((u(I,j+1,k)-Waves%us_x(I,j+1,k))*G%dxCu(I,j+1) - &
328-
(u(I,j,k)-Waves%us_x(I,j,k))*G%dxCu(I,j))
329-
enddo; enddo
330-
endif
319+
do J=Jsq-1,Jeq+1 ; do I=Isq-1,Ieq+1
320+
dvdx(I,J) = ((v(i+1,J,k)-Waves%us_y(i+1,J,k))*G%dyCv(i+1,J) - &
321+
(v(i,J,k)-Waves%us_y(i,J,k))*G%dyCv(i,J))
322+
dudy(I,J) = ((u(I,j+1,k)-Waves%us_x(I,j+1,k))*G%dxCu(I,j+1) - &
323+
(u(I,j,k)-Waves%us_x(I,j,k))*G%dxCu(I,j))
324+
enddo; enddo
331325
else
332326
do J=Jsq-1,Jeq+1 ; do I=Isq-1,Ieq+1
333327
dvdx(I,J) = (v(i+1,J,k)*G%dyCv(i+1,J) - v(i,J,k)*G%dyCv(i,J))

0 commit comments

Comments
 (0)