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

Contents of /MITgcm/pkg/generic_advdiff/gad_u3_adv_y.F

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


Revision 1.3.4.1 - (show annotations) (download)
Wed Feb 6 15:48:08 2002 UTC (22 years, 4 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: +7 -10 lines
Updating ecco-branch-mod1 to checkpoint44.
Will be tagged ecco-branch-mod2.

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

  ViewVC Help
Powered by ViewVC 1.1.22