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

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

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


Revision 1.2 - (hide annotations) (download)
Mon Sep 10 00:14:05 2001 UTC (22 years, 8 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint44e_post, release1_p13_pre, checkpoint44f_post, checkpoint43a-release1mods, release1_p13, checkpoint40pre9, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1_p11, icebear5, icebear4, icebear3, icebear2, release1-branch_tutorials, chkpt44a_post, chkpt44c_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint44g_post, release1-branch-end, release1_final_v1, checkpoint44b_post, ecco_ice2, ecco_ice1, release1_p12_pre, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint40, checkpoint41, checkpoint44, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.1: +16 -5 lines
Slight re-write to help debug flux limited form.

1 adcroft 1.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 adcroft 1.2 _RL psiP,psiM,thetaP,thetaM
37 adcroft 1.1
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 adcroft 1.2 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 adcroft 1.1 vT(i,j)=
63     & 0.5*(vTrans(i,j)+abs(vTrans(i,j)))
64 adcroft 1.2 & *( Tracer(i,j-1) + psiP*Rj )
65 adcroft 1.1 & +0.5*(vTrans(i,j)-abs(vTrans(i,j)))
66 adcroft 1.2 & *( Tracer(i, j ) - psiM*Rj )
67 adcroft 1.1
68     ENDDO
69     ENDDO
70    
71     RETURN
72     END

  ViewVC Help
Powered by ViewVC 1.1.22