3 |
|
|
4 |
#include "GAD_OPTIONS.h" |
#include "GAD_OPTIONS.h" |
5 |
|
|
6 |
|
CBOP |
7 |
|
C !ROUTINE: GAD_U3_ADV_X |
8 |
|
|
9 |
|
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE GAD_U3_ADV_X( |
SUBROUTINE GAD_U3_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_U3_ADV_X | |
|
|
C | o Compute Zonal advective Flux of Tracer using | |
|
|
C | 3rd Order Upwind 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 upwind biased third-order interpolation (or the $\kappa=1/3$ scheme): |
20 |
|
C \begin{equation*} |
21 |
|
C F^x_{adv} = U \overline{ \theta - \frac{1}{6} \delta_{ii} \theta }^i |
22 |
|
C + \frac{1}{12} |U| \delta_{iii} \theta |
23 |
|
C \end{equation*} |
24 |
|
|
25 |
|
C !USES: =============================================================== |
26 |
|
IMPLICIT NONE |
27 |
#include "SIZE.h" |
#include "SIZE.h" |
28 |
#include "GRID.h" |
#include "GRID.h" |
29 |
#include "GAD.h" |
#include "GAD.h" |
30 |
|
|
31 |
C == Routine arguments == |
C !INPUT PARAMETERS: =================================================== |
32 |
|
C bi,bj :: tile indices |
33 |
|
C k :: vertical level |
34 |
|
C uTrans :: zonal volume transport |
35 |
|
C tracer :: tracer field |
36 |
|
C myThid :: thread number |
37 |
INTEGER bi,bj,k |
INTEGER bi,bj,k |
38 |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
39 |
_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) |
|
40 |
INTEGER myThid |
INTEGER myThid |
41 |
|
|
42 |
C == Local variables == |
C !OUTPUT PARAMETERS: ================================================== |
43 |
|
C uT :: zonal advective flux |
44 |
|
_RL uT (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
45 |
|
|
46 |
|
C !LOCAL VARIABLES: ==================================================== |
47 |
|
C i,j :: loop indices |
48 |
|
C Rjm,Rj,Rjp :: differences at i-1,i,i+1 |
49 |
|
C Rjjm,Rjjp :: second differences at i-1,i |
50 |
INTEGER i,j |
INTEGER i,j |
51 |
_RL Rjm,Rj,Rjp,Rjjm,Rjjp |
_RL Rjm,Rj,Rjp,Rjjm,Rjjp |
52 |
|
CEOP |
53 |
|
|
54 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
55 |
uT(1-Olx,j)=0. |
uT(1-Olx,j)=0. |