16 |
C == Global variables == |
C == Global variables == |
17 |
#include "SIZE.h" |
#include "SIZE.h" |
18 |
#include "GRID.h" |
#include "GRID.h" |
|
#ifdef USE_W2 |
|
19 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
20 |
|
#ifdef USE_W2 |
21 |
#include "W2_EXCH2_TOPOLOGY.h" |
#include "W2_EXCH2_TOPOLOGY.h" |
22 |
#include "W2_EXCH2_PARAMS.h" |
#include "W2_EXCH2_PARAMS.h" |
23 |
#endif /* USE_W2 */ |
#endif /* USE_W2 */ |
33 |
|
|
34 |
C == Local variables == |
C == Local variables == |
35 |
INTEGER I,J |
INTEGER I,J |
|
#ifndef USE_W2 |
|
|
_RL Zip,Zij,Zpj,Dim,Dij,Dmj |
|
|
#else /* USE_W2 */ |
|
36 |
_RL Zip,Zij,Zpj,Dim,Dij,Dmj,uDij |
_RL Zip,Zij,Zpj,Dim,Dij,Dmj,uDij |
37 |
LOGICAL northWestCorner, northEastCorner, |
LOGICAL northWestCorner, northEastCorner, |
38 |
& southWestCorner, southEastCorner |
& southWestCorner, southEastCorner |
39 |
|
#ifdef USE_W2 |
40 |
INTEGER myTile |
INTEGER myTile |
41 |
|
#endif /* USE_W2 */ |
42 |
|
|
43 |
C Special stuff for Cubed Sphere |
C Special stuff for Cubed Sphere |
44 |
IF (useCubedSphereExchange) THEN |
IF (useCubedSphereExchange) THEN |
45 |
|
#ifdef USE_W2 |
46 |
southWestCorner = .FALSE. |
southWestCorner = .FALSE. |
47 |
southEastCorner = .FALSE. |
southEastCorner = .FALSE. |
48 |
northWestCorner = .FALSE. |
northWestCorner = .FALSE. |
64 |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
65 |
northWestCorner = .TRUE. |
northWestCorner = .TRUE. |
66 |
ENDIF |
ENDIF |
67 |
ENDIF |
#else |
68 |
|
southWestCorner = .TRUE. |
69 |
|
southEastCorner = .TRUE. |
70 |
|
northWestCorner = .TRUE. |
71 |
|
northEastCorner = .TRUE. |
72 |
#endif /* USE_W2 */ |
#endif /* USE_W2 */ |
73 |
|
ENDIF |
74 |
|
|
75 |
C - Laplacian and bi-harmonic terms |
C - Laplacian and bi-harmonic terms |
76 |
DO j=2-Oly,sNy+Oly-1 |
DO j=2-Oly,sNy+Oly-1 |
93 |
Zij= hFacZ( i , j )*vort3( i , j ) |
Zij= hFacZ( i , j )*vort3( i , j ) |
94 |
Zpj= hFacZ(i+1, j )*vort3(i+1, j ) |
Zpj= hFacZ(i+1, j )*vort3(i+1, j ) |
95 |
|
|
|
#ifdef USE_W2 |
|
96 |
C Special stuff for Cubed Sphere |
C Special stuff for Cubed Sphere |
97 |
uDij=Dij |
uDij=Dij |
98 |
IF (useCubedSphereExchange) THEN |
IF (useCubedSphereExchange) THEN |
144 |
endif |
endif |
145 |
ENDIF |
ENDIF |
146 |
|
|
|
#endif /* USE_W2 */ |
|
147 |
c del2u(i,j) = recip_rAw(i,j,bi,bj)*( |
c del2u(i,j) = recip_rAw(i,j,bi,bj)*( |
148 |
c & +recip_hFacW(i,j,k,bi,bj)*( Dij-Dmj ) |
c & +recip_hFacW(i,j,k,bi,bj)*( Dij-Dmj ) |
149 |
c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) ) |
c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) ) |
151 |
c & + ( Dij-Dmj ) |
c & + ( Dij-Dmj ) |
152 |
c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) ) |
c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) ) |
153 |
del2u(i,j) = |
del2u(i,j) = |
|
#ifndef USE_W2 |
|
|
& + ( Dij-Dmj )*recip_DXC(i,j,bi,bj) |
|
|
#else /* USE_W2 */ |
|
154 |
& + ( uDij-Dmj )*recip_DXC(i,j,bi,bj) |
& + ( uDij-Dmj )*recip_DXC(i,j,bi,bj) |
|
#endif /* USE_W2 */ |
|
155 |
& -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij )*recip_DYG(i,j,bi,bj) |
& -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij )*recip_DYG(i,j,bi,bj) |
156 |
|
|
157 |
c del2v(i,j) = recip_rAs(i,j,bi,bj)*( |
c del2v(i,j) = recip_rAs(i,j,bi,bj)*( |