/[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.6 - (hide annotations) (download)
Tue Mar 29 15:50:30 2011 UTC (13 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, HEAD
Changes since 1.5: +18 -18 lines
pass maskW & maskS as argument

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_c4_adv_y.F,v 1.5 2003/05/01 16:12:36 jmc Exp $
2 jmc 1.2 C $Name: $
3 adcroft 1.1
4     #include "GAD_OPTIONS.h"
5    
6 adcroft 1.4 CBOP
7     C !ROUTINE: GAD_C4_ADV_Y
8    
9     C !INTERFACE: ==========================================================
10 jmc 1.6 SUBROUTINE GAD_C4_ADV_Y(
11 adcroft 1.1 I bi,bj,k,
12 jmc 1.6 I vTrans, maskLocS,
13 adcroft 1.1 I tracer,
14     O vT,
15     I myThid )
16 adcroft 1.4
17     C !DESCRIPTION:
18     C Calculates the area integrated meridional flux due to advection of a tracer
19     C using centered fourth-order interpolation:
20     C \begin{equation*}
21     C F^y_{adv} = V \overline{ \theta - \frac{1}{6} \delta_{jj} \theta }^j
22     C \end{equation*}
23     C Near boundaries, the scheme reduces to a second if the flow is away
24     C from the boundary and to third order if the flow is towards
25     C the boundary.
26    
27     C !USES: ===============================================================
28 adcroft 1.1 IMPLICIT NONE
29     #include "SIZE.h"
30     #include "GRID.h"
31     #include "GAD.h"
32    
33 adcroft 1.4 C !INPUT PARAMETERS: ===================================================
34 jmc 1.6 C bi,bj :: tile indices
35     C k :: vertical level
36     C vTrans :: meridional volume transport
37     C maskLocS :: mask (either 0 or 1) at grid-cell southern edge
38     C tracer :: tracer field
39     C myThid :: my thread Id number
40 adcroft 1.1 INTEGER bi,bj,k
41 jmc 1.6 _RL vTrans (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42     _RS maskLocS(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43     _RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44 adcroft 1.4 INTEGER myThid
45    
46     C !OUTPUT PARAMETERS: ==================================================
47 jmc 1.6 C uT :: zonal advective flux
48     _RL vT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49 adcroft 1.1
50 adcroft 1.4 C !LOCAL VARIABLES: ====================================================
51     C i,j :: loop indices
52     C Rjm,Rj,Rjp :: differences at j-1,j,j+1
53     C Rjjm,Rjjp :: second differences at j-1,j
54 adcroft 1.1 INTEGER i,j
55     _RL Rjm,Rj,Rjp,Rjjm,Rjjp
56 adcroft 1.4 CEOP
57 adcroft 1.1
58     DO i=1-Olx,sNx+Olx
59     vT(i,1-Oly)=0.
60 jmc 1.2 vT(i,2-Oly)=0.
61     vT(i,sNy+Oly)=0.
62 adcroft 1.1 ENDDO
63 jmc 1.2 DO j=1-Oly+2,sNy+Oly-1
64 adcroft 1.1 DO i=1-Olx,sNx+Olx
65 jmc 1.6 Rjp = (tracer(i,j+1)-tracer(i, j ))*maskLocS(i,j+1)
66     Rj = (tracer(i, j )-tracer(i,j-1))*maskLocS(i, j )
67     Rjm = (tracer(i,j-1)-tracer(i,j-2))*maskLocS(i,j-1)
68 jmc 1.5 Rjjp=(Rjp-Rj)
69     Rjjm=(Rj-Rjm)
70 jmc 1.3 vT(i,j) =
71 adcroft 1.1 & vTrans(i,j)*(
72     & Tracer(i,j)+Tracer(i,j-1)-oneSixth*( Rjjp+Rjjm )
73     & )*0.5 _d 0
74 jmc 1.3 & +ABS( vTrans(i,j) )*0.5 _d 0*oneSixth*( Rjjp-Rjjm )
75     & *( 1. _d 0 - maskS(i,j-1,k,bi,bj)*maskS(i,j+1,k,bi,bj) )
76 jmc 1.6 c & *( 1. _d 0 - maskLocS(i,j-1)*maskLocS(i,j+1) )
77 adcroft 1.1 ENDDO
78     ENDDO
79    
80     RETURN
81     END

  ViewVC Help
Powered by ViewVC 1.1.22