/[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.3 by adcroft, Mon Sep 10 00:24:14 2001 UTC revision 1.4 by heimbach, Thu Nov 8 23:39:34 2001 UTC
# Line 35  C     == Local variables == Line 35  C     == Local variables ==
35        _RL Rjm,Rj,Rjp,cfl,d0,d1,psiP,psiM,thetaP,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-Oly)=0.         vT(i,1-Oly)=0.D0
39         vT(i,2-Oly)=0.         vT(i,2-Oly)=0.D0
40         vT(i,sNy+Oly)=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
# Line 46  C     == Local variables == Line 46  C     == Local variables ==
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=abs(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.-cfl)*(1.-cfl)*oneSixth          d0=(2.D0-cfl)*(1.D0-cfl)*oneSixth
50          d1=(1.-cfl*cfl)*oneSixth          d1=(1.D0-cfl*cfl)*oneSixth
51  c       thetaP=0.  c       thetaP=0.D0
52  c       IF (Rj.NE.0.) thetaP=Rjm/Rj  c       IF (Rj.NE.0.D0) thetaP=Rjm/Rj
53          thetaP=Rjm/(1.D-20+Rj)          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)/(1.D-20+cfl)*thetaP))          psiP=max(0.D0, min(min(1.D0,psiP),
56         &       (1.D0-cfl)/(1.D-20+cfl)*thetaP))
57          thetaM=Rjp/(1.D-20+Rj)          thetaM=Rjp/(1.D-20+Rj)
58  c       thetaM=0.  c       thetaM=0.D0
59  c       IF (Rj.NE.0.) thetaM=Rjp/Rj  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)/(1.D-20+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 )

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

  ViewVC Help
Powered by ViewVC 1.1.22