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

Annotation of /MITgcm/pkg/generic_advdiff/gad_dst3fl_adv_x.F

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


Revision 1.3.4.2 - (hide annotations) (download)
Fri Mar 7 03:55:23 2003 UTC (21 years, 2 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, ecco_c50_e29, ecco_c50_e28, ecco_c50_e33a, ecco_c51_e34
Changes since 1.3.4.1: +7 -2 lines
merging c49 and e27.

1 heimbach 1.3.4.2 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_dst3fl_adv_x.F,v 1.5 2002/03/06 01:29:36 jmc Exp $
2 heimbach 1.2 C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6     SUBROUTINE GAD_DST3FL_ADV_X(
7     I bi,bj,k,deltaT,
8     I uTrans, uVel,
9     I tracer,
10     O uT,
11     I myThid )
12     C /==========================================================\
13     C | SUBROUTINE GAD_DST3FL_ADV_X |
14     C | o Compute Zonal advective Flux of Tracer using |
15     C | 3rd Order DST Sceheme with flux limiting |
16     C |==========================================================|
17     IMPLICIT NONE
18    
19     C == GLobal variables ==
20     #include "SIZE.h"
21     #include "GRID.h"
22     #include "GAD.h"
23    
24     C == Routine arguments ==
25     INTEGER bi,bj,k
26     _RL deltaT
27     _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28     _RL uVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30     _RL uT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
31     INTEGER myThid
32    
33     C == Local variables ==
34 heimbach 1.3.4.2 C uFld :: velocity [m/s], zonal component
35 adcroft 1.1 INTEGER i,j
36 adcroft 1.3 _RL Rjm,Rj,Rjp,cfl,d0,d1,psiP,psiM,thetaP,thetaM
37 heimbach 1.3.4.2 _RL uFld
38 adcroft 1.1
39     DO j=1-Oly,sNy+Oly
40 heimbach 1.3.4.1 uT(1-Olx,j)=0.D0
41     uT(2-Olx,j)=0.D0
42     uT(sNx+Olx,j)=0.D0
43 adcroft 1.1 DO i=1-Olx+2,sNx+Olx-1
44     Rjp=(tracer(i+1,j)-tracer(i,j))*maskW(i+1,j,k,bi,bj)
45     Rj =(tracer(i,j)-tracer(i-1,j))*maskW(i,j,k,bi,bj)
46     Rjm=(tracer(i-1,j)-tracer(i-2,j))*maskW(i-1,j,k,bi,bj)
47    
48 heimbach 1.3.4.2 c uFld = uVel(i,j,k,bi,bj)
49     uFld = uTrans(i,j)*recip_dyG(i,j,bi,bj)
50     & *recip_drF(k)*recip_hFacW(i,j,k,bi,bj)
51     cfl=abs(uFld*deltaT*recip_dxC(i,j,bi,bj))
52 heimbach 1.3.4.1 d0=(2.D0-cfl)*(1.D0-cfl)*oneSixth
53     d1=(1.D0-cfl*cfl)*oneSixth
54     c thetaP=0.D0
55     c IF (Rj.NE.0.D0) thetaP=Rjm/Rj
56 adcroft 1.3 thetaP=Rjm/(1.D-20+Rj)
57 adcroft 1.1 psiP=d0+d1*thetaP
58 heimbach 1.3.4.1 psiP=max(0.D0, min(min(1.D0,psiP),
59     & (1.D0-cfl)/(1.D-20+cfl)*thetaP))
60 adcroft 1.3 thetaM=Rjp/(1.D-20+Rj)
61 heimbach 1.3.4.1 c thetaM=0.D0
62     c IF (Rj.NE.0.D0) thetaM=Rjp/Rj
63 adcroft 1.1 psiM=d0+d1*thetaM
64 heimbach 1.3.4.1 psiM=max(0.D0, min(min(1.D0,psiM),
65     & (1.D0-cfl)/(1.D-20+cfl)*thetaM))
66 adcroft 1.1 uT(i,j)=
67 heimbach 1.2 & 0.5*(uTrans(i,j)+abs(uTrans(i,j)))
68     & *( Tracer(i-1,j) + psiP*Rj )
69     & +0.5*(uTrans(i,j)-abs(uTrans(i,j)))
70     & *( Tracer( i ,j) - psiM*Rj )
71 adcroft 1.1
72     ENDDO
73     ENDDO
74    
75     RETURN
76     END

  ViewVC Help
Powered by ViewVC 1.1.22