12 |
O a5d, b5d, c5d, d5d, e5d, |
O a5d, b5d, c5d, d5d, e5d, |
13 |
I myThid ) |
I myThid ) |
14 |
|
|
15 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: |
16 |
C *==========================================================* |
|
17 |
C | S/R GAD_U3C4_IMPL_R |
C Compute matrix element to solve vertical advection |
18 |
C | o Compute matrix element to solve vertical advection |
C \begin{enumerate} |
19 |
C | implicitly using 3rd order upwind |
C \item implicitly using 3rd order upwind, or |
20 |
C | or 4th order Centered advection schemes |
C \item 4th order Centered advection schemes. |
21 |
C *==========================================================* |
C \end{enumerate} |
22 |
C | o contribution of vertical transport at interface k |
C Also, the contribution of vertical transport at interface k |
23 |
C | is added to matrix lines k & k-1 |
C is added to matrix lines k and k-1 |
|
C *==========================================================* |
|
|
C \ev |
|
24 |
|
|
25 |
C !USES: |
C !USES: |
26 |
IMPLICIT NONE |
IMPLICIT NONE |
32 |
#include "PARAMS.h" |
#include "PARAMS.h" |
33 |
#include "GAD.h" |
#include "GAD.h" |
34 |
|
|
35 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
36 |
C == Routine Arguments == |
C == Routine Arguments == |
37 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
38 |
C k :: vertical level |
C k :: vertical level |
39 |
C iMin,iMax,jMin,jMax :: computation domain |
C iMin,iMax :: computation domain |
40 |
C advectionScheme :: advection scheme to use |
C jMin,jMax :: computation domain |
41 |
C deltaTarg :: time step |
C advectionScheme :: advection scheme to use |
42 |
C rTrans :: vertical volume transport |
C deltaTarg :: time step |
43 |
C tFld :: tracer field |
C rTrans :: vertical volume transport |
44 |
C a5d :: 2nd lower diagonal of the pentadiagonal matrix |
C tFld :: tracer field |
45 |
C b5d :: 1rst lower diagonal of the pentadiagonal matrix |
C a5d :: 2nd lower diag of pentadiagonal matrix |
46 |
C c5d :: main diagonal of the pentadiagonal matrix |
C b5d :: 1rst lower diag of pentadiagonal matrix |
47 |
C d5d :: 1rst upper diagonal of the pentadiagonal matrix |
C c5d :: main diag of pentadiagonal matrix |
48 |
C e5d :: 2nd upper diagonal of the pentadiagonal matrix |
C d5d :: 1rst upper diag of pentadiagonal matrix |
49 |
C myThid :: thread number |
C e5d :: 2nd upper diag of pentadiagonal matrix |
50 |
|
C myThid :: thread number |
51 |
INTEGER bi,bj,k |
INTEGER bi,bj,k |
52 |
INTEGER iMin,iMax,jMin,jMax |
INTEGER iMin,iMax,jMin,jMax |
53 |
INTEGER advectionScheme |
INTEGER advectionScheme |
60 |
_RL e5d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL e5d (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
61 |
INTEGER myThid |
INTEGER myThid |
62 |
|
|
63 |
C == Local Variables == |
C == Local Variables == |
64 |
C i,j :: loop indices |
C i,j :: loop indices |
65 |
C kp1 :: =min( k+1 , Nr ) |
C kp1 :: =min( k+1 , Nr ) |
66 |
C km2 :: =max( k-2 , 1 ) |
C km2 :: =max( k-2 , 1 ) |
67 |
C rCenter :: centered contribution |
C rCenter :: centered contribution |
68 |
C rUpwind :: upwind contribution |
C rUpwind :: upwind contribution |
69 |
LOGICAL flagC4 |
LOGICAL flagC4 |
70 |
INTEGER i,j,kp1,km2 |
INTEGER i,j,kp1,km2 |
71 |
_RL rCenter, rUpwind |
_RL rCenter, rUpwind |