7 |
C !ROUTINE: GAD_FLUXLIMIT_ADV_X |
C !ROUTINE: GAD_FLUXLIMIT_ADV_X |
8 |
|
|
9 |
C !INTERFACE: ========================================================== |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE GAD_FLUXLIMIT_ADV_X( |
SUBROUTINE GAD_FLUXLIMIT_ADV_X( |
11 |
I bi,bj,k,deltaTloc, |
I bi,bj,k,deltaTloc, |
12 |
I uTrans, uVel, |
I uTrans, uFld, |
13 |
I maskLocW, tracer, |
I maskLocW, tracer, |
14 |
O uT, |
O uT, |
15 |
I myThid ) |
I myThid ) |
18 |
C Calculates the area integrated zonal flux due to advection of a tracer |
C Calculates the area integrated zonal flux due to advection of a tracer |
19 |
C using second-order interpolation with a flux limiter: |
C using second-order interpolation with a flux limiter: |
20 |
C \begin{equation*} |
C \begin{equation*} |
21 |
C F^x_{adv} = U \overline{ \theta }^i |
C F^x_{adv} = U \overline{ \theta }^i |
22 |
C - \frac{1}{2} \left( |
C - \frac{1}{2} \left( |
23 |
C [ 1 - \psi(C_r) ] |U| |
C [ 1 - \psi(C_r) ] |U| |
24 |
C + U \frac{u \Delta t}{\Delta x_c} \psi(C_r) |
C + U \frac{u \Delta t}{\Delta x_c} \psi(C_r) |
36 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
37 |
C k :: vertical level |
C k :: vertical level |
38 |
C uTrans :: zonal volume transport |
C uTrans :: zonal volume transport |
39 |
C uVel :: zonal flow |
C uFld :: zonal flow |
40 |
C tracer :: tracer field |
C tracer :: tracer field |
41 |
C myThid :: thread number |
C myThid :: thread number |
42 |
INTEGER bi,bj,k |
INTEGER bi,bj,k |
43 |
_RL deltaTloc |
_RL deltaTloc |
44 |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
45 |
_RL uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL uFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
46 |
_RS maskLocW(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS maskLocW(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
47 |
_RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
48 |
INTEGER myThid |
INTEGER myThid |
55 |
C i,j :: loop indices |
C i,j :: loop indices |
56 |
C Cr :: slope ratio |
C Cr :: slope ratio |
57 |
C Rjm,Rj,Rjp :: differences at i-1,i,i+1 |
C Rjm,Rj,Rjp :: differences at i-1,i,i+1 |
58 |
C uFld :: velocity [m/s], zonal component |
C uLoc :: velocity [m/s], zonal component |
59 |
INTEGER i,j |
INTEGER i,j |
60 |
_RL Cr,Rjm,Rj,Rjp |
_RL Cr,Rjm,Rj,Rjp |
61 |
_RL uFld |
_RL uLoc |
62 |
C Statement function provides Limiter(Cr) |
C Statement function provides Limiter(Cr) |
63 |
#include "GAD_FLUX_LIMITER.h" |
#include "GAD_FLUX_LIMITER.h" |
64 |
CEOP |
CEOP |
69 |
uT(sNx+Olx,j)=0. |
uT(sNx+Olx,j)=0. |
70 |
DO i=1-Olx+2,sNx+Olx-1 |
DO i=1-Olx+2,sNx+Olx-1 |
71 |
|
|
72 |
c uFld = uVel(i,j,k,bi,bj) |
c uLoc = uFld(i,j) |
73 |
uFld = uTrans(i,j)*recip_dyG(i,j,bi,bj) |
uLoc = uTrans(i,j)*recip_dyG(i,j,bi,bj) |
74 |
& *recip_drF(k)*_recip_hFacW(i,j,k,bi,bj) |
& *recip_drF(k)*_recip_hFacW(i,j,k,bi,bj) |
75 |
Rjp=(tracer(i+1,j)-tracer( i ,j))*maskLocW(i+1,j) |
Rjp=(tracer(i+1,j)-tracer( i ,j))*maskLocW(i+1,j) |
76 |
Rj =(tracer( i ,j)-tracer(i-1,j))*maskLocW( i ,j) |
Rj =(tracer( i ,j)-tracer(i-1,j))*maskLocW( i ,j) |
90 |
ENDIF |
ENDIF |
91 |
ENDIF |
ENDIF |
92 |
Cr=Limiter(Cr) |
Cr=Limiter(Cr) |
93 |
uT(i,j) = |
uT(i,j) = |
94 |
& uTrans(i,j)*(Tracer(i,j)+Tracer(i-1,j))*0.5 _d 0 |
& uTrans(i,j)*(Tracer(i,j)+Tracer(i-1,j))*0.5 _d 0 |
95 |
& -0.5*( |
& -0.5*( |
96 |
& (1-Cr)*ABS(uTrans(i,j)) |
& (1-Cr)*ABS(uTrans(i,j)) |
97 |
& +uTrans(i,j)*uFld*deltaTloc |
& +uTrans(i,j)*uLoc*deltaTloc |
98 |
& *recip_dxC(i,j,bi,bj)*Cr |
& *recip_dxC(i,j,bi,bj)*Cr |
99 |
& )*Rj |
& )*Rj |
100 |
ENDDO |
ENDDO |