7 |
C !ROUTINE: GAD_DST2U1_ADV_X |
C !ROUTINE: GAD_DST2U1_ADV_X |
8 |
|
|
9 |
C !INTERFACE: ========================================================== |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE GAD_DST2U1_ADV_X( |
SUBROUTINE GAD_DST2U1_ADV_X( |
11 |
I bi,bj,k, advectionScheme, |
I bi,bj,k, advectionScheme, |
12 |
I deltaTloc, uTrans, uVel, |
I deltaTloc, uTrans, uVel, |
13 |
I tracer, |
I tracer, |
16 |
|
|
17 |
C !DESCRIPTION: |
C !DESCRIPTION: |
18 |
C Calculates the area integrated zonal flux due to advection |
C Calculates the area integrated zonal flux due to advection |
19 |
C of a tracer using second-order Direct Space and Time (DST-2) |
C of a tracer using second-order Direct Space and Time (DST-2) |
20 |
C interpolation (=Lax-Wendroff) or simple 1rst order upwind scheme. |
C interpolation (=Lax-Wendroff) or simple 1rst order upwind scheme. |
21 |
|
|
22 |
C !USES: =============================================================== |
C !USES: =============================================================== |
28 |
C !INPUT PARAMETERS: =================================================== |
C !INPUT PARAMETERS: =================================================== |
29 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
30 |
C k :: vertical level |
C k :: vertical level |
31 |
C advectionScheme :: advection scheme to use: either 2nd Order DST |
C advectionScheme :: advection scheme to use: either 2nd Order DST |
32 |
C or 1rst Order Upwind |
C or 1rst Order Upwind |
33 |
C uTrans :: zonal volume transport |
C uTrans :: zonal volume transport |
34 |
C uVel :: zonal flow |
C uVel :: zonal flow |
52 |
C uFld :: velocity [m/s], zonal component |
C uFld :: velocity [m/s], zonal component |
53 |
C uCFL :: Courant-Friedrich-Levy number |
C uCFL :: Courant-Friedrich-Levy number |
54 |
INTEGER i,j |
INTEGER i,j |
55 |
_RL uFld, uCFL, xLimit |
_RL uFld, uCFL, xLimit, uAbs |
56 |
CEOP |
CEOP |
57 |
|
|
58 |
xLimit = 0. _d 0 |
xLimit = 0. _d 0 |
67 |
& *recip_drF(k)*_recip_hFacW(i,j,k,bi,bj) |
& *recip_drF(k)*_recip_hFacW(i,j,k,bi,bj) |
68 |
uCFL = ABS(uFld*deltaTloc*recip_dxC(i,j,bi,bj)) |
uCFL = ABS(uFld*deltaTloc*recip_dxC(i,j,bi,bj)) |
69 |
|
|
70 |
uT(i,j) = |
c uT(i,j) = |
71 |
& uTrans(i,j)*(Tracer(i-1,j)+Tracer(i,j))*0.5 _d 0 |
c & uTrans(i,j)*(tracer(i-1,j)+tracer(i,j))*0.5 _d 0 |
72 |
& + ( 1. _d 0 - xLimit*(1. _d 0 - uCFL) )*ABS(uTrans(i,j)) |
c & + ( 1. _d 0 - xLimit*(1. _d 0 - uCFL) )*ABS(uTrans(i,j)) |
73 |
& *(tracer(i-1,j)-tracer(i,j))*0.5 _d 0 |
c & *(tracer(i-1,j)-tracer(i,j))*0.5 _d 0 |
74 |
|
C-- above formulation produces large truncation error when: |
75 |
|
C 1rst.O upWind and u > 0 & |tracer(i-1,j)| << |tracer(i,j)| |
76 |
|
C or u < 0 & |tracer(i-1,j)| >> |tracer(i,j)| |
77 |
|
C-- change to a more robust expression: |
78 |
|
uAbs = ABS(uTrans(i,j)) |
79 |
|
& *( 1. _d 0 - xLimit*(1. _d 0 - uCFL) ) |
80 |
|
uT(i,j) = ( uTrans(i,j)+uAbs )* 0.5 _d 0 * tracer(i-1,j) |
81 |
|
& + ( uTrans(i,j)-uAbs )* 0.5 _d 0 * tracer(i,j) |
82 |
ENDDO |
ENDDO |
83 |
ENDDO |
ENDDO |
84 |
|
|