1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "GAD_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE GAD_DST3_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_DST3_ADV_Y | |
14 |
C | o Compute Meridional advective Flux of Tracer using | |
15 |
C | 3rd Order DST Sceheme | |
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 |
_RL Rjm,Rj,Rjp,cfl,d0,d1 |
36 |
_RL psiP,psiM,thetaP,thetaM |
37 |
|
38 |
DO i=1-Olx,sNx+Olx |
39 |
vT(i,1-Oly)=0. |
40 |
vT(i,2-Oly)=0. |
41 |
vT(i,sNy+Oly)=0. |
42 |
ENDDO |
43 |
DO j=1-Oly+2,sNy+Oly-1 |
44 |
DO i=1-Olx,sNx+Olx |
45 |
Rjp=(tracer(i,j+1)-tracer(i,j))*maskS(i,j+1,k,bi,bj) |
46 |
Rj =(tracer(i,j)-tracer(i,j-1))*maskS(i,j,k,bi,bj) |
47 |
Rjm=(tracer(i,j-1)-tracer(i,j-2))*maskS(i,j-1,k,bi,bj) |
48 |
|
49 |
cfl=abs(vVel(i,j,k,bi,bj)*deltaT*recip_dyc(i,j,bi,bj)) |
50 |
d0=(2.-cfl)*(1.-cfl)*oneSixth |
51 |
d1=(1.-cfl*cfl)*oneSixth |
52 |
c thetaP=0. |
53 |
c IF (Rj.NE.0.) thetaP=Rjm/Rj |
54 |
thetaP=Rjm/(1.D-20+Rj) |
55 |
psiP=d0+d1*thetaP |
56 |
c psiP=max(0.,min(min(1.,psiP),(1.-cfl)/(1.D-20+cfl)*thetaP)) |
57 |
thetaM=Rjp/(1.D-20+Rj) |
58 |
c thetaM=0. |
59 |
c IF (Rj.NE.0.) thetaM=Rjp/Rj |
60 |
psiM=d0+d1*thetaM |
61 |
c psiM=max(0.,min(min(1.,psiM),(1.-cfl)/(1.D-20+cfl)*thetaM)) |
62 |
vT(i,j)= |
63 |
& 0.5*(vTrans(i,j)+abs(vTrans(i,j))) |
64 |
& *( Tracer(i,j-1) + psiP*Rj ) |
65 |
& +0.5*(vTrans(i,j)-abs(vTrans(i,j))) |
66 |
& *( Tracer(i, j ) - psiM*Rj ) |
67 |
|
68 |
ENDDO |
69 |
ENDDO |
70 |
|
71 |
RETURN |
72 |
END |