56 |
|
|
57 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
58 |
|
|
59 |
C Load grid spacing (vector) from files |
C-- Load grid spacing (vector) from files |
60 |
CALL LOAD_GRID_SPACING( myThid ) |
CALL LOAD_GRID_SPACING( myThid ) |
61 |
|
|
62 |
C Set up vertical grid and coordinate system |
C-- Set up vertical grid and coordinate system |
63 |
CALL INI_VERTICAL_GRID( myThid ) |
CALL INI_VERTICAL_GRID( myThid ) |
64 |
|
|
65 |
|
C-- Initialise (everywhere) all horizontal grid array to null value |
66 |
|
C Note: some arrays are not defined in some parts of the halo |
67 |
|
C region. We set them to zero here for safety. If they are ever |
68 |
|
C referred to, especially in the denominator then it is a mistake! |
69 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
70 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
71 |
|
DO j=1-OLy,sNy+OLy |
72 |
|
DO i=1-OLx,sNx+OLx |
73 |
|
xC(i,j,bi,bj) = 0. |
74 |
|
yC(i,j,bi,bj) = 0. |
75 |
|
xG(i,j,bi,bj) = 0. |
76 |
|
yG(i,j,bi,bj) = 0. |
77 |
|
dxC(i,j,bi,bj) = 0. |
78 |
|
dyC(i,j,bi,bj) = 0. |
79 |
|
dxG(i,j,bi,bj) = 0. |
80 |
|
dyG(i,j,bi,bj) = 0. |
81 |
|
dxF(i,j,bi,bj) = 0. |
82 |
|
dyF(i,j,bi,bj) = 0. |
83 |
|
dxV(i,j,bi,bj) = 0. |
84 |
|
dyU(i,j,bi,bj) = 0. |
85 |
|
rA(i,j,bi,bj) = 0. |
86 |
|
rAz(i,j,bi,bj) = 0. |
87 |
|
rAw(i,j,bi,bj) = 0. |
88 |
|
rAs(i,j,bi,bj) = 0. |
89 |
|
recip_dxG(i,j,bi,bj) = 0. |
90 |
|
recip_dyG(i,j,bi,bj) = 0. |
91 |
|
recip_dxC(i,j,bi,bj) = 0. |
92 |
|
recip_dyC(i,j,bi,bj) = 0. |
93 |
|
recip_dxF(i,j,bi,bj) = 0. |
94 |
|
recip_dyF(i,j,bi,bj) = 0. |
95 |
|
recip_dxV(i,j,bi,bj) = 0. |
96 |
|
recip_dyU(i,j,bi,bj) = 0. |
97 |
|
recip_rA (i,j,bi,bj) = 0. |
98 |
|
recip_rAs(i,j,bi,bj) = 0. |
99 |
|
recip_rAw(i,j,bi,bj) = 0. |
100 |
|
recip_rAz(i,j,bi,bj) = 0. |
101 |
|
tanPhiAtU(i,j,bi,bj) = 0. |
102 |
|
tanPhiAtV(i,j,bi,bj) = 0. |
103 |
|
angleCosC(i,j,bi,bj) = 1. |
104 |
|
angleSinC(i,j,bi,bj) = 0. |
105 |
|
u2zonDir(i,j,bi,bj) = 1. |
106 |
|
v2zonDir(i,j,bi,bj) = 0. |
107 |
|
ENDDO |
108 |
|
cosFacU(j,bi,bj) = 1. |
109 |
|
cosFacV(j,bi,bj) = 1. |
110 |
|
sqCosFacU(j,bi,bj) = 1. |
111 |
|
sqCosFacV(j,bi,bj) = 1. |
112 |
|
ENDDO |
113 |
|
ENDDO |
114 |
|
ENDDO |
115 |
|
|
116 |
C Two examples are shown in this code. One illustrates the |
C Two examples are shown in this code. One illustrates the |
117 |
C initialization of a cartesian grid. The other shows the |
C initialization of a cartesian grid. The other shows the |
118 |
C inialization of a spherical polar grid. Other orthonormal grids |
C inialization of a spherical polar grid. Other orthonormal grids |
129 |
C routines that map computational blocks to simulation |
C routines that map computational blocks to simulation |
130 |
C domain blocks. |
C domain blocks. |
131 |
|
|
132 |
C Set up horizontal grid and coordinate system |
C-- Set up horizontal grid and coordinate system |
133 |
IF ( usingCartesianGrid ) THEN |
IF ( usingCartesianGrid ) THEN |
134 |
CALL INI_CARTESIAN_GRID( myThid ) |
CALL INI_CARTESIAN_GRID( myThid ) |
135 |
ELSEIF ( usingSphericalPolarGrid ) THEN |
ELSEIF ( usingSphericalPolarGrid ) THEN |
148 |
_END_MASTER(myThid) |
_END_MASTER(myThid) |
149 |
ENDIF |
ENDIF |
150 |
|
|
151 |
C--- Calculate reciprocals grid lengths (formerly part of INI_MASKS_ETC) |
C-- Calculate reciprocals grid lengths (formerly part of INI_MASKS_ETC) |
152 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
153 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
154 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |