Skip to content

Commit

Permalink
Corrected bug in the WENO 5th order scheme. A factor of 0.5 was mista…
Browse files Browse the repository at this point in the history
…kenly added in the previous version
  • Loading branch information
Wendazhang33 committed Sep 20, 2024
1 parent d0cac62 commit deb573e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/MOM_CoriolisAdv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, pbv, Wav
enddo ; enddo
elseif (CS%Coriolis_Scheme == wenovi_5th_ENSTRO) then
do j=js,je ; do I=Isq,Ieq
v_u = 0.125 * ((v(i+1,J,k) + v(i,J,k)) + (v(i,J-1,k) + v(i+1,J-1,k)))
v_u = 0.25 * ((v(i+1,J,k) + v(i,J,k)) + (v(i,J-1,k) + v(i+1,J-1,k)))

v_q2 = (v(i+1,J-3,k) + v(i,J-3,k)) * 0.5
v_q3 = (v(i+1,J-2,k) + v(i,J-2,k)) * 0.5
Expand Down Expand Up @@ -830,7 +830,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS, pbv, Wav
enddo ; enddo
elseif (CS%Coriolis_Scheme == wenovi_5th_ENSTRO) then
do J=Jsq,Jeq ; do i=is,ie
u_v = 0.125* ((u(I-1,j,k) + u(I-1,j+1,k)) + (u(I,j,k) + u(I,j+1,k)))
u_v = 0.25* ((u(I-1,j,k) + u(I-1,j+1,k)) + (u(I,j,k) + u(I,j+1,k)))

u_q2 = (u(I-3,j+1,k) + u(I-3,j,k)) * 0.5
u_q3 = (u(I-2,j+1,k) + u(I-2,j,k)) * 0.5
Expand Down

0 comments on commit deb573e

Please sign in to comment.