32 |
|
|
33 |
C == Local variables == |
C == Local variables == |
34 |
INTEGER i,j |
INTEGER i,j |
35 |
_RL Rjm,Rj,Rjp,cfl,d0,d1,psiP,thetaP,psiM,thetaM |
_RL Rjm,Rj,Rjp,cfl,d0,d1,psiP,psiM,thetaP,thetaM |
36 |
|
|
37 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
38 |
uT(1-Olx,j)=0. |
uT(1-Olx,j)=0. |
43 |
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) |
44 |
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) |
45 |
|
|
46 |
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)) |
47 |
d0=(2.-abs(cfl))*(1.-abs(cfl))*oneSixth |
d0=(2.-cfl)*(1.-cfl)*oneSixth |
48 |
d1=(1.-cfl)*(1.+cfl)*oneSixth |
d1=(1.-cfl*cfl)*oneSixth |
49 |
thetaP=Rjm/(1.D-30+Rj) |
c thetaP=0. |
50 |
|
c IF (Rj.NE.0.) thetaP=Rjm/Rj |
51 |
|
thetaP=Rjm/(1.D-20+Rj) |
52 |
psiP=d0+d1*thetaP |
psiP=d0+d1*thetaP |
53 |
psiP=max(0., min(min(1.,psiP),(1.-cfl)/cfl*thetaP) ) |
psiP=max(0., min(min(1.,psiP),(1.-cfl)/(1.D-20+cfl)*thetaP)) |
54 |
thetaM=Rjp/(-1.D-30+Rj) |
thetaM=Rjp/(1.D-20+Rj) |
55 |
|
c thetaM=0. |
56 |
|
c IF (Rj.NE.0.) thetaM=Rjp/Rj |
57 |
psiM=d0+d1*thetaM |
psiM=d0+d1*thetaM |
58 |
psiM=max(0., min(min(1.,psiM),(1.-cfl)/cfl*thetaM) ) |
psiM=max(0., min(min(1.,psiM),(1.-cfl)/(1.D-20+cfl)*thetaM)) |
59 |
uT(i,j)= |
uT(i,j)= |
60 |
& 0.5*(uTrans(i,j)+abs(uTrans(i,j))) |
& 0.5*(uTrans(i,j)+abs(uTrans(i,j))) |
61 |
& *( Tracer(i-1,j) + psiP*Rj ) |
& *( Tracer(i-1,j) + psiP*Rj ) |
62 |
& +0.5*(uTrans(i,j)-abs(uTrans(i,j))) |
& +0.5*(uTrans(i,j)-abs(uTrans(i,j))) |
63 |
& *( Tracer( i ,j) - psiM*Rj ) |
& *( Tracer( i ,j) - psiM*Rj ) |
|
cph *note* put these comments after end of continued line |
|
|
cph to ensure TAMC compatibility |
|
|
c & 0.5*(uTrans(i,j)+abs(uTrans(i,j))) |
|
|
c & *( Tracer(i-1,j) + d0*Rj + d1*Rjm ) |
|
|
c & +0.5*(uTrans(i,j)-abs(uTrans(i,j))) |
|
|
c & *( Tracer( i ,j) - d0*Rj + d1*Rjp ) |
|
64 |
|
|
65 |
ENDDO |
ENDDO |
66 |
ENDDO |
ENDDO |