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 i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
38 |
vT(i,1-Olx)=0. |
vT(i,1-Oly)=0.D0 |
39 |
vT(i,2-Olx)=0. |
vT(i,2-Oly)=0.D0 |
40 |
vT(i,sNx+Olx)=0. |
vT(i,sNy+Oly)=0.D0 |
41 |
ENDDO |
ENDDO |
42 |
DO j=1-Oly+2,sNy+Oly-1 |
DO j=1-Oly+2,sNy+Oly-1 |
43 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
45 |
Rj =(tracer(i,j)-tracer(i,j-1))*maskS(i,j,k,bi,bj) |
Rj =(tracer(i,j)-tracer(i,j-1))*maskS(i,j,k,bi,bj) |
46 |
Rjm=(tracer(i,j-1)-tracer(i,j-2))*maskS(i,j-1,k,bi,bj) |
Rjm=(tracer(i,j-1)-tracer(i,j-2))*maskS(i,j-1,k,bi,bj) |
47 |
|
|
48 |
cfl=vVel(i,j,k,bi,bj)*deltaT*recip_dyc(i,j,bi,bj) |
cfl=abs(vVel(i,j,k,bi,bj)*deltaT*recip_dyc(i,j,bi,bj)) |
49 |
d0=(2.-abs(cfl))*(1.-abs(cfl))*oneSixth |
d0=(2.D0-cfl)*(1.D0-cfl)*oneSixth |
50 |
d1=(1.-cfl)*(1.+cfl)*oneSixth |
d1=(1.D0-cfl*cfl)*oneSixth |
51 |
thetaP=Rjm/(1.D-30+Rj) |
c thetaP=0.D0 |
52 |
|
c IF (Rj.NE.0.D0) thetaP=Rjm/Rj |
53 |
|
thetaP=Rjm/(1.D-20+Rj) |
54 |
psiP=d0+d1*thetaP |
psiP=d0+d1*thetaP |
55 |
psiP=max(0., min(min(1.,psiP),(1.-cfl)/cfl*thetaP) ) |
psiP=max(0.D0, min(min(1.D0,psiP), |
56 |
thetaM=Rjp/(-1.D-30+Rj) |
& (1.D0-cfl)/(1.D-20+cfl)*thetaP)) |
57 |
|
thetaM=Rjp/(1.D-20+Rj) |
58 |
|
c thetaM=0.D0 |
59 |
|
c IF (Rj.NE.0.D0) thetaM=Rjp/Rj |
60 |
psiM=d0+d1*thetaM |
psiM=d0+d1*thetaM |
61 |
psiM=max(0., min(min(1.,psiM),(1.-cfl)/cfl*thetaM) ) |
psiM=max(0.D0, min(min(1.D0,psiM), |
62 |
|
& (1.D0-cfl)/(1.D-20+cfl)*thetaM)) |
63 |
vT(i,j)= |
vT(i,j)= |
64 |
& 0.5*(vTrans(i,j)+abs(vTrans(i,j))) |
& 0.5*(vTrans(i,j)+abs(vTrans(i,j))) |
65 |
& *( Tracer(i,j-1) + psiP*Rj ) |
& *( Tracer(i,j-1) + psiP*Rj ) |
66 |
& +0.5*(vTrans(i,j)-abs(vTrans(i,j))) |
& +0.5*(vTrans(i,j)-abs(vTrans(i,j))) |
67 |
& *( 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*(vTrans(i,j)+abs(vTrans(i,j))) |
|
|
c & *( Tracer(i,j-1) + d0*Rj + d1*Rjm ) |
|
|
c & +0.5*(vTrans(i,j)-abs(vTrans(i,j))) |
|
|
c & *( Tracer(i, j ) - d0*Rj + d1*Rjp ) |
|
68 |
|
|
69 |
ENDDO |
ENDDO |
70 |
ENDDO |
ENDDO |