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

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

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


Revision 1.2 - (hide annotations) (download)
Wed Jul 11 22:46:32 2001 UTC (22 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre7, checkpoint40pre6, checkpoint40pre2, checkpoint40pre4, checkpoint40pre5
Changes since 1.1: +10 -3 lines
fix problem of index out of bounds

1 jmc 1.2 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_c4_adv_y.F,v 1.1 2001/05/30 19:34:48 adcroft Exp $
2     C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6     SUBROUTINE GAD_C4_ADV_Y(
7     I bi,bj,k,
8     I vTrans,
9     I tracer,
10     O vT,
11     I myThid )
12 jmc 1.2 C /==========================================================\
13     C | SUBROUTINE GAD_C4_ADV_Y |
14     C | o Compute Meridional advective Flux of Tracer using |
15     C | 4th Order Centered Scheme |
16     C |==========================================================|
17 adcroft 1.1 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 vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28     _RL vT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
29     INTEGER myThid
30    
31     C == Local variables ==
32     INTEGER i,j
33     _RL Rjm,Rj,Rjp,Rjjm,Rjjp
34    
35    
36     DO i=1-Olx,sNx+Olx
37     vT(i,1-Oly)=0.
38 jmc 1.2 vT(i,2-Oly)=0.
39     vT(i,sNy+Oly)=0.
40 adcroft 1.1 ENDDO
41 jmc 1.2 DO j=1-Oly+2,sNy+Oly-1
42 adcroft 1.1 DO i=1-Olx,sNx+Olx
43     Rjp=(tracer(i,j+1)-tracer(i,j))*maskS(i,j+1,k,bi,bj)
44     Rj=(tracer(i,j)-tracer(i,j-1))*maskS(i,j,k,bi,bj)
45     Rjm=(tracer(i,j-1)-tracer(i,j-2))*maskS(i,j-1,k,bi,bj)
46     Rjjp=Rjp-Rj
47     Rjjm=Rj-Rjm
48     vT(i,j) =
49     & vTrans(i,j)*(
50     & Tracer(i,j)+Tracer(i,j-1)-oneSixth*( Rjjp+Rjjm )
51     & )*0.5 _d 0
52     ENDDO
53     ENDDO
54    
55     RETURN
56     END

  ViewVC Help
Powered by ViewVC 1.1.22