/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_dst3fl_adv_y.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_dst3fl_adv_y.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by heimbach, Wed Sep 5 17:46:03 2001 UTC revision 1.3 by adcroft, Mon Sep 10 00:24:14 2001 UTC
# Line 32  C     == Routine arguments == Line 32  C     == Routine arguments ==
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.
39         vT(i,2-Olx)=0.         vT(i,2-Oly)=0.
40         vT(i,sNx+Olx)=0.         vT(i,sNy+Oly)=0.
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
# Line 45  C     == Local variables == Line 45  C     == Local variables ==
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.-cfl)*(1.-cfl)*oneSixth
50          d1=(1.-cfl)*(1.+cfl)*oneSixth          d1=(1.-cfl*cfl)*oneSixth
51          thetaP=Rjm/(1.D-30+Rj)  c       thetaP=0.
52    c       IF (Rj.NE.0.) 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., min(min(1.,psiP),(1.-cfl)/(1.D-20+cfl)*thetaP))
56          thetaM=Rjp/(-1.D-30+Rj)          thetaM=Rjp/(1.D-20+Rj)
57    c       thetaM=0.
58    c       IF (Rj.NE.0.) thetaM=Rjp/Rj
59          psiM=d0+d1*thetaM          psiM=d0+d1*thetaM
60          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))
61          vT(i,j)=          vT(i,j)=
62       &   0.5*(vTrans(i,j)+abs(vTrans(i,j)))       &   0.5*(vTrans(i,j)+abs(vTrans(i,j)))
63       &      *( Tracer(i,j-1) + psiP*Rj )       &      *( Tracer(i,j-1) + psiP*Rj )
64       &  +0.5*(vTrans(i,j)-abs(vTrans(i,j)))       &  +0.5*(vTrans(i,j)-abs(vTrans(i,j)))
65       &      *( 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 )  
66    
67         ENDDO         ENDDO
68        ENDDO        ENDDO

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22