33 |
C == Local variables == |
C == Local variables == |
34 |
INTEGER i,j |
INTEGER i,j |
35 |
_RL Rjm,Rj,Rjp,cfl,d0,d1 |
_RL Rjm,Rj,Rjp,cfl,d0,d1 |
36 |
|
_RL psiP,psiM,thetaP,thetaM |
37 |
|
|
38 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
39 |
uT(1-Olx,j)=0. |
uT(1-Olx,j)=0. |
44 |
Rj =(tracer(i,j)-tracer(i-1,j))*maskW(i,j,k,bi,bj) |
Rj =(tracer(i,j)-tracer(i-1,j))*maskW(i,j,k,bi,bj) |
45 |
Rjm=(tracer(i-1,j)-tracer(i-2,j))*maskW(i-1,j,k,bi,bj) |
Rjm=(tracer(i-1,j)-tracer(i-2,j))*maskW(i-1,j,k,bi,bj) |
46 |
|
|
47 |
cfl=uVel(i,j,k,bi,bj)*deltaT*recip_dxc(i,j,bi,bj) |
cfl=abs(uVel(i,j,k,bi,bj)*deltaT*recip_dxc(i,j,bi,bj)) |
48 |
d0=(2.-abs(cfl))*(1.-abs(cfl))*oneSixth |
d0=(2.-cfl)*(1.-cfl)*oneSixth |
49 |
d1=(1.-cfl)*(1.+cfl)*oneSixth |
d1=(1.-cfl*cfl)*oneSixth |
50 |
|
c thetaP=0. |
51 |
|
c IF (Rj.NE.0.) thetaP=Rjm/Rj |
52 |
|
thetaP=Rjm/(1.D-20+Rj) |
53 |
|
psiP=d0+d1*thetaP |
54 |
|
c psiP=max(0.,min(min(1.,psiP),(1.-cfl)/(1.D-20+cfl)*thetaP)) |
55 |
|
thetaM=Rjp/(1.D-20+Rj) |
56 |
|
c thetaM=0. |
57 |
|
c IF (Rj.NE.0.) thetaM=Rjp/Rj |
58 |
|
psiM=d0+d1*thetaM |
59 |
|
c psiM=max(0.,min(min(1.,psiM),(1.-cfl)/(1.D-20+cfl)*thetaM)) |
60 |
uT(i,j)= |
uT(i,j)= |
61 |
& 0.5*(uTrans(i,j)+abs(uTrans(i,j))) |
& 0.5*(uTrans(i,j)+abs(uTrans(i,j))) |
62 |
& *( Tracer(i-1,j) + d0*Rj + d1*Rjm ) |
& *( Tracer(i-1,j) + psiP*Rj ) |
63 |
& +0.5*(uTrans(i,j)-abs(uTrans(i,j))) |
& +0.5*(uTrans(i,j)-abs(uTrans(i,j))) |
64 |
& *( Tracer( i ,j) - d0*Rj + d1*Rjp ) |
& *( Tracer( i ,j) - psiM*Rj ) |
65 |
|
|
66 |
ENDDO |
ENDDO |
67 |
ENDDO |
ENDDO |