3 |
|
|
4 |
#include "GAD_OPTIONS.h" |
#include "GAD_OPTIONS.h" |
5 |
|
|
6 |
|
CBOP |
7 |
|
C !ROUTINE: GAD_C4_ADV_X |
8 |
|
|
9 |
|
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE GAD_C4_ADV_X( |
SUBROUTINE GAD_C4_ADV_X( |
11 |
I bi,bj,k, |
I bi,bj,k, |
12 |
I uTrans, |
I uTrans, |
13 |
I tracer, |
I tracer, |
14 |
O uT, |
O uT, |
15 |
I myThid ) |
I myThid ) |
|
C /==========================================================\ |
|
|
C | SUBROUTINE GAD_C4_ADV_X | |
|
|
C | o Compute Zonal 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 zonal flux due to advection of a tracer |
19 |
|
C using centered fourth-order interpolation: |
20 |
|
C \begin{equation*} |
21 |
|
C F^x_{adv} = U \overline{ \theta - \frac{1}{6} \delta_{ii} \theta }^i |
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 uTrans :: zonal volume transport |
37 |
|
C tracer :: tracer field |
38 |
|
C myThid :: thread number |
39 |
INTEGER bi,bj,k |
INTEGER bi,bj,k |
40 |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uTrans(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 uT (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 uT (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 i-1,i,i+1 |
51 |
|
C Rjjm,Rjjp :: second differences at i-1,i |
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 j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
57 |
uT(1-Olx,j)=0. |
uT(1-Olx,j)=0. |