1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
C |
C |
4 |
C /==========================================================\ |
CBOP |
5 |
C | GRID.h | |
C !ROUTINE: GRID.h |
6 |
C | o Header file defining model grid. | |
C !INTERFACE: |
7 |
C |==========================================================| |
C include GRID.h |
8 |
C | Model grid is defined for each process by reference to | |
C !DESCRIPTION: \bv |
9 |
C | the arrays set here. | |
C *==========================================================* |
10 |
C | Notes | |
C | GRID.h |
11 |
C | ===== | |
C | o Header file defining model grid. |
12 |
C | The standard MITgcm convention of westmost, southern most| |
C *==========================================================* |
13 |
C | and upper most having the (1,1,1) index is used here. | |
C | Model grid is defined for each process by reference to |
14 |
C | i.e. | |
C | the arrays set here. |
15 |
C |----------------------------------------------------------| |
C | Notes |
16 |
C | (1) Plan view schematic of model grid (top layer i.e. ) | |
C | ===== |
17 |
C | ================================= ( ocean surface ) | |
C | The standard MITgcm convention of westmost, southern most |
18 |
C | ( or top of ) | |
C | and upper most having the (1,1,1) index is used here. |
19 |
C | ( atmosphere ) | |
C | i.e. |
20 |
C | This diagram shows the location of the model | |
C |---------------------------------------------------------- |
21 |
C | prognostic variables on the model grid. The "T" | |
C | (1) Plan view schematic of model grid (top layer i.e. ) |
22 |
C | location is used for all tracers. The figure also | |
C | ================================= ( ocean surface ) |
23 |
C | shows the southern most, western most indexing | |
C | ( or top of ) |
24 |
C | convention that is used for all model variables. | |
C | ( atmosphere ) |
25 |
C | | |
C | This diagram shows the location of the model |
26 |
C | | |
C | prognostic variables on the model grid. The "T" |
27 |
C | V(i=1, V(i=Nx, | |
C | location is used for all tracers. The figure also |
28 |
C | j=Ny+1, j=Ny+1, | |
C | shows the southern most, western most indexing |
29 |
C | k=1) k=1) | |
C | convention that is used for all model variables. |
30 |
C | /|\ /|\ "PWX" | |
C | |
31 |
C | |---------|------------------etc.. |---- *--- | |
C | |
32 |
C | | | * | | |
C | V(i=1, V(i=Nx, |
33 |
C |"PWY"*******************************etc.. **********"PWY"| |
C | j=Ny+1, j=Ny+1, |
34 |
C | | | * | | |
C | k=1) k=1) |
35 |
C | | | * | | |
C | /|\ /|\ "PWX" |
36 |
C | | | * | | |
C | |---------|------------------etc.. |---- *--- |
37 |
C |U(i=1, ==> x | x *==>U | |
C | | | * | |
38 |
C | j=Ny,| T(i=1, | T(i=Nx, *(i=Nx+1,| |
C |"PWY"*******************************etc.. **********"PWY" |
39 |
C | k=1) | j=Ny, | j=Ny, * |j=Ny,| |
C | | | * | |
40 |
C | | k=1) | k=1) * |k=1) | |
C | | | * | |
41 |
C | | |
C | | | * | |
42 |
C | . . . | |
C |U(i=1, ==> x | x *==>U |
43 |
C | . . . | |
C | j=Ny,| T(i=1, | T(i=Nx, *(i=Nx+1, |
44 |
C | . . . | |
C | k=1) | j=Ny, | j=Ny, * |j=Ny, |
45 |
C | e e * e | |
C | | k=1) | k=1) * |k=1) |
46 |
C | t t * t | |
C | |
47 |
C | c c * c | |
C | . . . |
48 |
C | | | * | | |
C | . . . |
49 |
C | | | * | | |
C | . . . |
50 |
C |U(i=1, ==> x | x * | | |
C | e e * e |
51 |
C | j=2, | T(i=1, | T(i=Nx, * | | |
C | t t * t |
52 |
C | k=1) | j=2, | j=2, * | | |
C | c c * c |
53 |
C | | k=1) | k=1) * | | |
C | | | * | |
54 |
C | | | * | | |
C | | | * | |
55 |
C | | /|\ | /|\ * | | |
C |U(i=1, ==> x | x * | |
56 |
C | -----------|------------------etc.. |-----*--- | |
C | j=2, | T(i=1, | T(i=Nx, * | |
57 |
C | | V(i=1, | V(i=Nx, * | | |
C | k=1) | j=2, | j=2, * | |
58 |
C | | j=2, | j=2, * | | |
C | | k=1) | k=1) * | |
59 |
C | | k=1) | k=1) * | | |
C | | | * | |
60 |
C | | | * | | |
C | | /|\ | /|\ * | |
61 |
C |U(i=1, ==> x ==>U(i=2, x *==>U | |
C | -----------|------------------etc.. |-----*--- |
62 |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1,| |
C | | V(i=1, | V(i=Nx, * | |
63 |
C | k=1) | j=1, | k=1) j=1, * |j=1, | |
C | | j=2, | j=2, * | |
64 |
C | | k=1) | k=1) * |k=1) | |
C | | k=1) | k=1) * | |
65 |
C | | | * | | |
C | | | * | |
66 |
C | | /|\ | /|\ * | | |
C |U(i=1, ==> x ==>U(i=2, x *==>U |
67 |
C |"SB"++>|---------|------------------etc.. |-----*--- | |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1, |
68 |
C | /+\ V(i=1, V(i=Nx, * | |
C | k=1) | j=1, | k=1) j=1, * |j=1, |
69 |
C | + j=1, j=1, * | |
C | | k=1) | k=1) * |k=1) |
70 |
C | + k=1) k=1) * | |
C | | | * | |
71 |
C | "WB" "PWX" | |
C | | /|\ | /|\ * | |
72 |
C | | |
C |"SB"++>|---------|------------------etc.. |-----*--- |
73 |
C | N, y increasing northwards | |
C | /+\ V(i=1, V(i=Nx, * |
74 |
C | /|\ j increasing northwards | |
C | + j=1, j=1, * |
75 |
C | | | |
C | + k=1) k=1) * |
76 |
C | | | |
C | "WB" "PWX" |
77 |
C | ======>E, x increasing eastwards | |
C | |
78 |
C | i increasing eastwards | |
C | N, y increasing northwards |
79 |
C | | |
C | /|\ j increasing northwards |
80 |
C | i: East-west index | |
C | | |
81 |
C | j: North-south index | |
C | | |
82 |
C | k: up-down index | |
C | ======>E, x increasing eastwards |
83 |
C | U: x-velocity (m/s) | |
C | i increasing eastwards |
84 |
C | V: y-velocity (m/s) | |
C | |
85 |
C | T: potential temperature (oC) | |
C | i: East-west index |
86 |
C | "SB": Southern boundary | |
C | j: North-south index |
87 |
C | "WB": Western boundary | |
C | k: up-down index |
88 |
C |"PWX": Periodic wrap around in X. | |
C | U: x-velocity (m/s) |
89 |
C |"PWY": Periodic wrap around in Y. | |
C | V: y-velocity (m/s) |
90 |
C |----------------------------------------------------------| |
C | T: potential temperature (oC) |
91 |
C | (2) South elevation schematic of model grid | |
C | "SB": Southern boundary |
92 |
C | ======================================= | |
C | "WB": Western boundary |
93 |
C | This diagram shows the location of the model | |
C |"PWX": Periodic wrap around in X. |
94 |
C | prognostic variables on the model grid. The "T" | |
C |"PWY": Periodic wrap around in Y. |
95 |
C | location is used for all tracers. The figure also | |
C |---------------------------------------------------------- |
96 |
C | shows the upper most, western most indexing | |
C | (2) South elevation schematic of model grid |
97 |
C | convention that is used for all model variables. | |
C | ======================================= |
98 |
C | | |
C | This diagram shows the location of the model |
99 |
C | "WB" | |
C | prognostic variables on the model grid. The "T" |
100 |
C | + | |
C | location is used for all tracers. The figure also |
101 |
C | + | |
C | shows the upper most, western most indexing |
102 |
C | \+/ /|\ /|\ | |
C | convention that is used for all model variables. |
103 |
C |"UB"++>|-------- | -----------------etc.. | ----*--- | |
C | |
104 |
C | | rVel(i=1, | rVel(i=Nx, * | | |
C | "WB" |
105 |
C | | j=1, | j=1, * | | |
C | + |
106 |
C | | k=1) | k=1) * | | |
C | + |
107 |
C | | | * | | |
C | \+/ /|\ /|\ |
108 |
C |U(i=1, ==> x ==>U(i=2, x *==>U | |
C |"UB"++>|-------- | -----------------etc.. | ----*--- |
109 |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1,| |
C | | rVel(i=1, | rVel(i=Nx, * | |
110 |
C | k=1) | j=1, | k=1) j=1, * |j=1, | |
C | | j=1, | j=1, * | |
111 |
C | | k=1) | k=1) * |k=1) | |
C | | k=1) | k=1) * | |
112 |
C | | | * | | |
C | | | * | |
113 |
C | | /|\ | /|\ * | | |
C |U(i=1, ==> x ==>U(i=2, x *==>U |
114 |
C | |-------- | -----------------etc.. | ----*--- | |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1, |
115 |
C | | rVel(i=1, | rVel(i=Nx, * | | |
C | k=1) | j=1, | k=1) j=1, * |j=1, |
116 |
C | | j=1, | j=1, * | | |
C | | k=1) | k=1) * |k=1) |
117 |
C | | k=2) | k=2) * | | |
C | | | * | |
118 |
C | | |
C | | /|\ | /|\ * | |
119 |
C | . . . | |
C | |-------- | -----------------etc.. | ----*--- |
120 |
C | . . . | |
C | | rVel(i=1, | rVel(i=Nx, * | |
121 |
C | . . . | |
C | | j=1, | j=1, * | |
122 |
C | e e * e | |
C | | k=2) | k=2) * | |
123 |
C | t t * t | |
C | |
124 |
C | c c * c | |
C | . . . |
125 |
C | | | * | | |
C | . . . |
126 |
C | | | * | | |
C | . . . |
127 |
C | | | * | | |
C | e e * e |
128 |
C | | | * | | |
C | t t * t |
129 |
C | | /|\ | /|\ * | | |
C | c c * c |
130 |
C | |-------- | -----------------etc.. | ----*--- | |
C | | | * | |
131 |
C | | rVel(i=1, | rVel(i=Nx, * | | |
C | | | * | |
132 |
C | | j=1, | j=1, * | | |
C | | | * | |
133 |
C | | k=Nr) | k=Nr) * | | |
C | | | * | |
134 |
C |U(i=1, ==> x ==>U(i=2, x *==>U | |
C | | /|\ | /|\ * | |
135 |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1,| |
C | |-------- | -----------------etc.. | ----*--- |
136 |
C | k=Nr)| j=1, | k=Nr) j=1, * |j=1, | |
C | | rVel(i=1, | rVel(i=Nx, * | |
137 |
C | | k=Nr) | k=Nr) * |k=Nr)| |
C | | j=1, | j=1, * | |
138 |
C | | | * | | |
C | | k=Nr) | k=Nr) * | |
139 |
C |"LB"++>============================================== | |
C |U(i=1, ==> x ==>U(i=2, x *==>U |
140 |
C | "PWX" | |
C | j=1, | T(i=1, | j=1, T(i=Nx, *(i=Nx+1, |
141 |
C | | |
C | k=Nr)| j=1, | k=Nr) j=1, * |j=1, |
142 |
C | Up increasing upwards. | |
C | | k=Nr) | k=Nr) * |k=Nr) |
143 |
C |/|\ | |
C | | | * | |
144 |
C | | | |
C |"LB"++>============================================== |
145 |
C | | | |
C | "PWX" |
146 |
C | =====> E i increasing eastwards | |
C | |
147 |
C | | x increasing eastwards | |
C | Up increasing upwards. |
148 |
C | | | |
C |/|\ |
149 |
C |\|/ | |
C | | |
150 |
C | Down,k increasing downwards. | |
C | | |
151 |
C | | |
C | =====> E i increasing eastwards |
152 |
C | Note: r => height (m) => r increases upwards | |
C | | x increasing eastwards |
153 |
C | r => pressure (Pa) => r increases downwards | |
C | | |
154 |
C | | |
C |\|/ |
155 |
C | | |
C | Down,k increasing downwards. |
156 |
C | i: East-west index | |
C | |
157 |
C | j: North-south index | |
C | Note: r => height (m) => r increases upwards |
158 |
C | k: up-down index | |
C | r => pressure (Pa) => r increases downwards |
159 |
C | U: x-velocity (m/s) | |
C | |
160 |
C | rVel: z-velocity ( units of r ) | |
C | |
161 |
C | The vertical velocity variable rVel is in units of | |
C | i: East-west index |
162 |
C | "r" the vertical coordinate. r in m will give | |
C | j: North-south index |
163 |
C | rVel m/s. r in Pa will give rVel Pa/s. | |
C | k: up-down index |
164 |
C | T: potential temperature (oC) | |
C | U: x-velocity (m/s) |
165 |
C | "UB": Upper boundary. | |
C | rVel: z-velocity ( units of r ) |
166 |
C | "LB": Lower boundary (always solid - therefore om|w == 0)| |
C | The vertical velocity variable rVel is in units of |
167 |
C | "WB": Western boundary | |
C | "r" the vertical coordinate. r in m will give |
168 |
C |"PWX": Periodic wrap around in X. | |
C | rVel m/s. r in Pa will give rVel Pa/s. |
169 |
C |----------------------------------------------------------| |
C | T: potential temperature (oC) |
170 |
C | (3) Views showing nomenclature and indexing | |
C | "UB": Upper boundary. |
171 |
C | for grid descriptor variables. | |
C | "LB": Lower boundary (always solid - therefore om|w == 0) |
172 |
C | | |
C | "WB": Western boundary |
173 |
C | Fig 3a. shows the orientation, indexing and | |
C |"PWX": Periodic wrap around in X. |
174 |
C | notation for the grid spacing terms used internally | |
C |---------------------------------------------------------- |
175 |
C | for the evaluation of gradient and averaging terms. | |
C | (3) Views showing nomenclature and indexing |
176 |
C | These varaibles are set based on the model input | |
C | for grid descriptor variables. |
177 |
C | parameters which define the model grid in terms of | |
C | |
178 |
C | spacing in X, Y and Z. | |
C | Fig 3a. shows the orientation, indexing and |
179 |
C | | |
C | notation for the grid spacing terms used internally |
180 |
C | Fig 3b. shows the orientation, indexing and | |
C | for the evaluation of gradient and averaging terms. |
181 |
C | notation for the variables that are used to define | |
C | These varaibles are set based on the model input |
182 |
C | the model grid. These varaibles are set directly | |
C | parameters which define the model grid in terms of |
183 |
C | from the model input. | |
C | spacing in X, Y and Z. |
184 |
C | | |
C | |
185 |
C | Figure 3a | |
C | Fig 3b. shows the orientation, indexing and |
186 |
C | ========= | |
C | notation for the variables that are used to define |
187 |
C | |------------------------------------ | |
C | the model grid. These varaibles are set directly |
188 |
C | | | | |
C | from the model input. |
189 |
C |"PWY"********************************* etc... | |
C | |
190 |
C | | | | |
C | Figure 3a |
191 |
C | | | | |
C | ========= |
192 |
C | | | | |
C | |------------------------------------ |
193 |
C | | | | |
C | | | |
194 |
C | | | | |
C |"PWY"********************************* etc... |
195 |
C | | | | |
C | | | |
196 |
C | | | | |
C | | | |
197 |
C | | |
C | | | |
198 |
C | . . | |
C | | | |
199 |
C | . . | |
C | | | |
200 |
C | . . | |
C | | | |
201 |
C | e e | |
C | | | |
202 |
C | t t | |
C | |
203 |
C | c c | |
C | . . |
204 |
C | |-----------v-----------|-----------v----------|- | |
C | . . |
205 |
C | | | | | |
C | . . |
206 |
C | | | | | |
C | e e |
207 |
C | | | | | |
C | t t |
208 |
C | | | | | |
C | c c |
209 |
C | | | | | |
C | |-----------v-----------|-----------v----------|- |
210 |
C | u<--dxF(i=1,j=2,k=1)--->u t | | |
C | | | | |
211 |
C | |/|\ /|\ | | | |
C | | | | |
212 |
C | | | | | | | |
C | | | | |
213 |
C | | | | | | | |
C | | | | |
214 |
C | | | | | | | |
C | | | | |
215 |
C | |dyU(i=1, dyC(i=1, | | | |
C | u<--dxF(i=1,j=2,k=1)--->u t | |
216 |
C | --- ---|--j=2,---|--j=2,-----------------v----------|- | |
C | |/|\ /|\ | | |
217 |
C | /|\ | | k=1) | k=1) | /|\ | | |
C | | | | | | |
218 |
C | | | | | | dyF(i=2, | | |
C | | | | | | |
219 |
C | | | | | | | j=1, | | |
C | | | | | | |
220 |
C |dyG( |\|/ \|/ | | k=1) | | |
C | |dyU(i=1, dyC(i=1, | | |
221 |
C | i=1,u--- t<---dxC(i=2,j=1,k=1)-->t | | |
C | --- ---|--j=2,---|--j=2,-----------------v----------|- |
222 |
C | j=1,| | | | | |
C | /|\ | | k=1) | k=1) | /|\ | |
223 |
C | k=1)| | | | | |
C | | | | | | dyF(i=2, | |
224 |
C | | | | | | | |
C | | | | | | | j=1, | |
225 |
C | | | | | | | |
C |dyG( |\|/ \|/ | | k=1) | |
226 |
C | \|/ | |<---dxV(i=2,j=1,k=1)--\|/ | | |
C | i=1,u--- t<---dxC(i=2,j=1,k=1)-->t | |
227 |
C |"SB"++>|___________v___________|___________v__________|_ | |
C | j=1,| | | | |
228 |
C | <--dxG(i=1,j=1,k=1)-----> | |
C | k=1)| | | | |
229 |
C | /+\ | |
C | | | | | | |
230 |
C | + | |
C | | | | | | |
231 |
C | + | |
C | \|/ | |<---dxV(i=2,j=1,k=1)--\|/ | |
232 |
C | "WB" | |
C |"SB"++>|___________v___________|___________v__________|_ |
233 |
C | | |
C | <--dxG(i=1,j=1,k=1)-----> |
234 |
C | N, y increasing northwards | |
C | /+\ |
235 |
C | /|\ j increasing northwards | |
C | + |
236 |
C | | | |
C | + |
237 |
C | | | |
C | "WB" |
238 |
C | ======>E, x increasing eastwards | |
C | |
239 |
C | i increasing eastwards | |
C | N, y increasing northwards |
240 |
C | | |
C | /|\ j increasing northwards |
241 |
C | i: East-west index | |
C | | |
242 |
C | j: North-south index | |
C | | |
243 |
C | k: up-down index | |
C | ======>E, x increasing eastwards |
244 |
C | u: x-velocity point | |
C | i increasing eastwards |
245 |
C | V: y-velocity point | |
C | |
246 |
C | t: tracer point | |
C | i: East-west index |
247 |
C | "SB": Southern boundary | |
C | j: North-south index |
248 |
C | "WB": Western boundary | |
C | k: up-down index |
249 |
C |"PWX": Periodic wrap around in X. | |
C | u: x-velocity point |
250 |
C |"PWY": Periodic wrap around in Y. | |
C | V: y-velocity point |
251 |
C | | |
C | t: tracer point |
252 |
C | Figure 3b | |
C | "SB": Southern boundary |
253 |
C | ========= | |
C | "WB": Western boundary |
254 |
C | | |
C |"PWX": Periodic wrap around in X. |
255 |
C | . . | |
C |"PWY": Periodic wrap around in Y. |
256 |
C | . . | |
C | |
257 |
C | . . | |
C | Figure 3b |
258 |
C | e e | |
C | ========= |
259 |
C | t t | |
C | |
260 |
C | c c | |
C | . . |
261 |
C | |-----------v-----------|-----------v--etc... | |
C | . . |
262 |
C | | | | |
C | . . |
263 |
C | | | | |
C | e e |
264 |
C | | | | |
C | t t |
265 |
C | | | | |
C | c c |
266 |
C | | | | |
C | |-----------v-----------|-----------v--etc... |
267 |
C | u<--delX(i=1)---------->u t | |
C | | | |
268 |
C | | | | |
C | | | |
269 |
C | | | | |
C | | | |
270 |
C | | | | |
C | | | |
271 |
C | | | | |
C | | | |
272 |
C | | | | |
C | u<--delX(i=1)---------->u t |
273 |
C | |-----------v-----------------------v--etc... | |
C | | | |
274 |
C | | /|\ | | |
C | | | |
275 |
C | | | | | |
C | | | |
276 |
C | | | | | |
C | | | |
277 |
C | | | | | |
C | | | |
278 |
C | u delY(j=1) | t | |
C | |-----------v-----------------------v--etc... |
279 |
C | | | | | |
C | | /|\ | |
280 |
C | | | | | |
C | | | | |
281 |
C | | | | | |
C | | | | |
282 |
C | | | | | |
C | | | | |
283 |
C | | \|/ | | |
C | u delY(j=1) | t |
284 |
C |"SB"++>|___________v___________|___________v__etc... | |
C | | | | |
285 |
C | /+\ | |
C | | | | |
286 |
C | + | |
C | | | | |
287 |
C | + | |
C | | | | |
288 |
C | "WB" | |
C | | \|/ | |
289 |
C | | |
C |"SB"++>|___________v___________|___________v__etc... |
290 |
C \==========================================================/ |
C | /+\ |
291 |
|
C | + |
292 |
|
C | + |
293 |
|
C | "WB" |
294 |
|
C | |
295 |
|
C *==========================================================* |
296 |
|
C \ev |
297 |
|
CEOP |
298 |
|
|
299 |
C Macros that override/modify standard definitions |
C Macros that override/modify standard definitions |
300 |
#include "GRID_MACROS.h" |
#include "GRID_MACROS.h" |