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

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

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

revision 1.3 by jmc, Mon Aug 20 20:45:15 2001 UTC revision 1.4 by adcroft, Fri Sep 21 13:11:43 2001 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "GAD_OPTIONS.h"  #include "GAD_OPTIONS.h"
5    
6    CBOP
7    C !ROUTINE: GAD_C4_ADV_Y
8    
9    C !INTERFACE: ==========================================================
10        SUBROUTINE GAD_C4_ADV_Y(        SUBROUTINE GAD_C4_ADV_Y(
11       I           bi,bj,k,       I           bi,bj,k,
12       I           vTrans,       I           vTrans,
13       I           tracer,       I           tracer,
14       O           vT,       O           vT,
15       I           myThid )       I           myThid )
 C     /==========================================================\  
 C     | SUBROUTINE GAD_C4_ADV_Y                                  |  
 C     | o Compute Meridional advective Flux of Tracer using      |  
 C     |   4th Order Centered Scheme                              |  
 C     | o reduced to 2nd or 3rd Order near a boundary            |  
 C     |==========================================================|  
       IMPLICIT NONE  
16    
17  C     == GLobal variables ==  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          IMPLICIT NONE
29  #include "SIZE.h"  #include "SIZE.h"
30  #include "GRID.h"  #include "GRID.h"
31  #include "GAD.h"  #include "GAD.h"
32    
33  C     == Routine arguments ==  C !INPUT PARAMETERS: ===================================================
34    C  bi,bj                :: tile indices
35    C  k                    :: vertical level
36    C  vTrans               :: meridional volume transport
37    C  tracer               :: tracer field
38    C  myThid               :: thread number
39        INTEGER bi,bj,k        INTEGER bi,bj,k
40        _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
       _RL vT    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  
42        INTEGER myThid        INTEGER myThid
43    
44  C     == Local variables ==  C !OUTPUT PARAMETERS: ==================================================
45    C  uT                   :: zonal advective flux
46          _RL vT    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47    
48    C !LOCAL VARIABLES: ====================================================
49    C  i,j                  :: loop indices
50    C  Rjm,Rj,Rjp           :: differences at j-1,j,j+1
51    C  Rjjm,Rjjp            :: second differences at j-1,j
52        INTEGER i,j        INTEGER i,j
53        _RL Rjm,Rj,Rjp,Rjjm,Rjjp        _RL Rjm,Rj,Rjp,Rjjm,Rjjp
54    CEOP
55    
56        DO i=1-Olx,sNx+Olx        DO i=1-Olx,sNx+Olx
57         vT(i,1-Oly)=0.         vT(i,1-Oly)=0.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22