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

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

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


Revision 1.3.4.1 - (hide annotations) (download)
Wed Feb 6 15:48:08 2002 UTC (22 years, 5 months ago) by heimbach
Branch: ecco-branch
CVS Tags: icebear5, icebear4, icebear3, icebear2, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, ecco_ice2, ecco_ice1, ecco_c44_e22, ecco_c44_e25, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5
Branch point for: c24_e25_ice, icebear
Changes since 1.3: +14 -12 lines
Updating ecco-branch-mod1 to checkpoint44.
Will be tagged ecco-branch-mod2.

1 heimbach 1.3.4.1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_dst3fl_adv_y.F,v 1.4 2001/11/08 23:39:34 heimbach Exp $
2 heimbach 1.2 C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6     SUBROUTINE GAD_DST3FL_ADV_Y(
7     I bi,bj,k,deltaT,
8     I vTrans, vVel,
9     I tracer,
10     O vT,
11     I myThid )
12     C /==========================================================\
13     C | SUBROUTINE GAD_DST3FL_ADV_Y |
14     C | o Compute Meridional 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 vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28     _RL vVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30     _RL vT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
31     INTEGER myThid
32    
33     C == Local variables ==
34     INTEGER i,j
35 adcroft 1.3 _RL Rjm,Rj,Rjp,cfl,d0,d1,psiP,psiM,thetaP,thetaM
36 adcroft 1.1
37     DO i=1-Olx,sNx+Olx
38 heimbach 1.3.4.1 vT(i,1-Oly)=0.D0
39     vT(i,2-Oly)=0.D0
40     vT(i,sNy+Oly)=0.D0
41 adcroft 1.1 ENDDO
42     DO j=1-Oly+2,sNy+Oly-1
43     DO i=1-Olx,sNx+Olx
44     Rjp=(tracer(i,j+1)-tracer(i,j))*maskS(i,j+1,k,bi,bj)
45     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)
47    
48 adcroft 1.3 cfl=abs(vVel(i,j,k,bi,bj)*deltaT*recip_dyc(i,j,bi,bj))
49 heimbach 1.3.4.1 d0=(2.D0-cfl)*(1.D0-cfl)*oneSixth
50     d1=(1.D0-cfl*cfl)*oneSixth
51     c thetaP=0.D0
52     c IF (Rj.NE.0.D0) thetaP=Rjm/Rj
53 adcroft 1.3 thetaP=Rjm/(1.D-20+Rj)
54 adcroft 1.1 psiP=d0+d1*thetaP
55 heimbach 1.3.4.1 psiP=max(0.D0, min(min(1.D0,psiP),
56     & (1.D0-cfl)/(1.D-20+cfl)*thetaP))
57 adcroft 1.3 thetaM=Rjp/(1.D-20+Rj)
58 heimbach 1.3.4.1 c thetaM=0.D0
59     c IF (Rj.NE.0.D0) thetaM=Rjp/Rj
60 adcroft 1.1 psiM=d0+d1*thetaM
61 heimbach 1.3.4.1 psiM=max(0.D0, min(min(1.D0,psiM),
62     & (1.D0-cfl)/(1.D-20+cfl)*thetaM))
63 adcroft 1.1 vT(i,j)=
64 heimbach 1.2 & 0.5*(vTrans(i,j)+abs(vTrans(i,j)))
65     & *( Tracer(i,j-1) + psiP*Rj )
66     & +0.5*(vTrans(i,j)-abs(vTrans(i,j)))
67     & *( Tracer(i, j ) - psiM*Rj )
68 adcroft 1.1
69     ENDDO
70     ENDDO
71    
72     RETURN
73     END

  ViewVC Help
Powered by ViewVC 1.1.22