8 |
|
|
9 |
C !INTERFACE: ========================================================== |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_CDSCHEME( |
SUBROUTINE MOM_CDSCHEME( |
11 |
I bi,bj,k,phi_hyd, |
I bi,bj,k,phi_hyd,dPhiHydX,dPhiHydY, |
12 |
I myThid) |
I myThid) |
13 |
|
|
14 |
C !DESCRIPTION: |
C !DESCRIPTION: |
28 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
29 |
C k :: vertical level |
C k :: vertical level |
30 |
C phi_hyd :: hydrostatic pressure |
C phi_hyd :: hydrostatic pressure |
31 |
|
C dPhiHydX,Y :: Gradient (X & Y dir.) of Hydrostatic Potential |
32 |
C myThid :: thread number |
C myThid :: thread number |
33 |
INTEGER bi,bj,K |
INTEGER bi,bj,k |
34 |
_RL phi_hyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL phi_hyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
35 |
|
_RL dPhiHydX(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
36 |
|
_RL dPhiHydY(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
37 |
INTEGER myThid |
INTEGER myThid |
38 |
|
|
39 |
|
|
48 |
_RL aF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL aF(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
49 |
INTEGER i,j,iMin,iMax,jMin,jMax |
INTEGER i,j,iMin,iMax,jMin,jMax |
50 |
_RL ab15,ab05 |
_RL ab15,ab05 |
51 |
|
_RL phxFac, phyFac |
52 |
CEOP |
CEOP |
53 |
|
|
54 |
C Compute ranges |
C Compute ranges |
61 |
ab15 = 1.5 + abEps |
ab15 = 1.5 + abEps |
62 |
ab05 = -0.5 - abEps |
ab05 = -0.5 - abEps |
63 |
|
|
64 |
|
C-- stagger time stepping: grad Phi_Hyp is not in gU,gV and needs to be added: |
65 |
|
IF (.FALSE.) THEN |
66 |
|
c IF (staggerTimeStep) THEN |
67 |
|
phxFac = pfFacMom |
68 |
|
phyFac = pfFacMom |
69 |
|
ELSE |
70 |
|
phxFac = 0. |
71 |
|
phyFac = 0. |
72 |
|
ENDIF |
73 |
|
|
74 |
C Pressure extrapolated forward in time |
C Pressure extrapolated forward in time |
75 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
76 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
93 |
C grady(p) + gV |
C grady(p) + gV |
94 |
DO j=1-Oly+1,sNy+Oly |
DO j=1-Oly+1,sNy+Oly |
95 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
96 |
af(i,j) = -_maskS(i,j,k,bi,bj) |
af(i,j) = -_maskS(i,j,k,bi,bj)*( |
97 |
& *_recip_dyC(i,j,bi,bj) |
& _recip_dyC(i,j,bi,bj)*(pf(i,j)-pf(i,j-1)) |
98 |
& *(pf(i,j)-pf(i,j-1)) |
& +phyFac*dPhiHydY(i,j) ) |
99 |
& +gV(i,j,k,bi,bj) |
& + gV(i,j,k,bi,bj) |
100 |
ENDDO |
ENDDO |
101 |
ENDDO |
ENDDO |
102 |
C Average to Vd point and add coriolis |
C Average to Vd point and add coriolis |
149 |
C gradx(p)+gU |
C gradx(p)+gU |
150 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
151 |
DO i=1-Olx+1,sNx+Olx |
DO i=1-Olx+1,sNx+Olx |
152 |
af(i,j) = -_maskW(i,j,k,bi,bj) |
af(i,j) = -_maskW(i,j,k,bi,bj)*( |
153 |
& *_recip_dxC(i,j,bi,bj)* |
& _recip_dxC(i,j,bi,bj)*(pf(i,j)-pf(i-1,j)) |
154 |
& (pf(i,j)-pf(i-1,j)) |
& +phxFac*dPhiHydX(i,j) ) |
155 |
& +gU(i,j,k,bi,bj) |
& + gU(i,j,k,bi,bj) |
156 |
ENDDO |
ENDDO |
157 |
ENDDO |
ENDDO |
158 |
C Average to Ud point and add coriolis |
C Average to Ud point and add coriolis |