/[MITgcm]/MITgcm/model/inc/GRID.h
ViewVC logotype

Diff of /MITgcm/model/inc/GRID.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.18 by jmc, Thu Nov 8 16:34:57 2001 UTC revision 1.40 by jmc, Sun Jan 31 17:32:10 2010 UTC
# Line 7  C    !INTERFACE: Line 7  C    !INTERFACE:
7  C    include GRID.h  C    include GRID.h
8  C    !DESCRIPTION: \bv  C    !DESCRIPTION: \bv
9  C     *==========================================================*  C     *==========================================================*
10  C     | GRID.h                                                      C     | GRID.h
11  C     | o Header file defining model grid.                          C     | o Header file defining model grid.
12  C     *==========================================================*  C     *==========================================================*
13  C     | Model grid is defined for each process by reference to      C     | Model grid is defined for each process by reference to
14  C     | the arrays set here.                                        C     | the arrays set here.
15  C     | Notes                                                      C     | Notes
16  C     | =====                                                      C     | =====
17  C     | The standard MITgcm convention of westmost, southern most  C     | The standard MITgcm convention of westmost, southern most
18  C     | and upper most having the (1,1,1) index is used here.      C     | and upper most having the (1,1,1) index is used here.
19  C     | i.e.                                                        C     | i.e.
20  C     |----------------------------------------------------------  C     |----------------------------------------------------------
21  C     | (1)  Plan view schematic of model grid (top layer i.e. )    C     | (1)  Plan view schematic of model grid (top layer i.e. )
22  C     |      ================================= ( ocean surface )    C     |      ================================= ( ocean surface )
23  C     |                                        ( or top of     )    C     |                                        ( or top of     )
24  C     |                                        ( atmosphere    )    C     |                                        ( atmosphere    )
25  C     |      This diagram shows the location of the model          C     |      This diagram shows the location of the model
26  C     |      prognostic variables on the model grid. The "T"        C     |      prognostic variables on the model grid. The "T"
27  C     |      location is used for all tracers. The figure also      C     |      location is used for all tracers. The figure also
28  C     |      shows the southern most, western most indexing        C     |      shows the southern most, western most indexing
29  C     |      convention that is used for all model variables.      C     |      convention that is used for all model variables.
30  C     |                                                            C     |
31  C     |                                                            C     |
32  C     |             V(i=1,                     V(i=Nx,              C     |             V(i=1,                     V(i=Nx,
33  C     |               j=Ny+1,                    j=Ny+1,            C     |               j=Ny+1,                    j=Ny+1,
34  C     |               k=1)                       k=1)              C     |               k=1)                       k=1)
35  C     |                /|\                       /|\  "PWX"        C     |                /|\                       /|\  "PWX"
36  C     |       |---------|------------------etc..  |---- *---        C     |       |---------|------------------etc..  |---- *---
37  C     |       |                     |                   *  |        C     |       |                     |                   *  |
38  C     |"PWY"*******************************etc..  **********"PWY"  C     |"PWY"*******************************etc..  **********"PWY"
39  C     |       |                     |                   *  |        C     |       |                     |                   *  |
40  C     |       |                     |                   *  |        C     |       |                     |                   *  |
41  C     |       |                     |                   *  |        C     |       |                     |                   *  |
42  C     |U(i=1, ==>       x           |             x     *==>U      C     |U(i=1, ==>       x           |             x     *==>U
43  C     |  j=Ny,|      T(i=1,         |          T(i=Nx,  *(i=Nx+1,  C     |  j=Ny,|      T(i=1,         |          T(i=Nx,  *(i=Nx+1,
44  C     |  k=1) |        j=Ny,        |            j=Ny,  *  |j=Ny,  C     |  k=1) |        j=Ny,        |            j=Ny,  *  |j=Ny,
45  C     |       |        k=1)         |            k=1)   *  |k=1)    C     |       |        k=1)         |            k=1)   *  |k=1)
46  C     |                                                            C     |
47  C     |       .                     .                      .        C     |       .                     .                      .
48  C     |       .                     .                      .        C     |       .                     .                      .
49  C     |       .                     .                      .        C     |       .                     .                      .
50  C     |       e                     e                   *  e        C     |       e                     e                   *  e
51  C     |       t                     t                   *  t        C     |       t                     t                   *  t
52  C     |       c                     c                   *  c        C     |       c                     c                   *  c
53  C     |       |                     |                   *  |        C     |       |                     |                   *  |
54  C     |       |                     |                   *  |        C     |       |                     |                   *  |
55  C     |U(i=1, ==>       x           |             x     *  |        C     |U(i=1, ==>       x           |             x     *  |
56  C     |  j=2, |      T(i=1,         |          T(i=Nx,  *  |        C     |  j=2, |      T(i=1,         |          T(i=Nx,  *  |
57  C     |  k=1) |        j=2,         |            j=2,   *  |        C     |  k=1) |        j=2,         |            j=2,   *  |
58  C     |       |        k=1)         |            k=1)   *  |        C     |       |        k=1)         |            k=1)   *  |
59  C     |       |                     |                   *  |        C     |       |                     |                   *  |
60  C     |       |        /|\          |            /|\    *  |        C     |       |        /|\          |            /|\    *  |
61  C     |      -----------|------------------etc..  |-----*---        C     |      -----------|------------------etc..  |-----*---
62  C     |       |       V(i=1,        |           V(i=Nx, *  |        C     |       |       V(i=1,        |           V(i=Nx, *  |
63  C     |       |         j=2,        |             j=2,  *  |        C     |       |         j=2,        |             j=2,  *  |
64  C     |       |         k=1)        |             k=1)  *  |        C     |       |         k=1)        |             k=1)  *  |
65  C     |       |                     |                   *  |        C     |       |                     |                   *  |
66  C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U      C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U
67  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,
68  C     |  k=1) |        j=1,         |  k=1)      j=1,   *  |j=1,    C     |  k=1) |        j=1,         |  k=1)      j=1,   *  |j=1,
69  C     |       |        k=1)         |            k=1)   *  |k=1)    C     |       |        k=1)         |            k=1)   *  |k=1)
70  C     |       |                     |                   *  |        C     |       |                     |                   *  |
71  C     |       |        /|\          |            /|\    *  |        C     |       |        /|\          |            /|\    *  |
72  C     |"SB"++>|---------|------------------etc..  |-----*---        C     |"SB"++>|---------|------------------etc..  |-----*---
73  C     |      /+\      V(i=1,                    V(i=Nx, *          C     |      /+\      V(i=1,                    V(i=Nx, *
74  C     |       +         j=1,                      j=1,  *          C     |       +         j=1,                      j=1,  *
75  C     |       +         k=1)                      k=1)  *          C     |       +         k=1)                      k=1)  *
76  C     |     "WB"                                      "PWX"        C     |     "WB"                                      "PWX"
77  C     |                                                            C     |
78  C     |   N, y increasing northwards                                C     |   N, y increasing northwards
79  C     |  /|\ j increasing northwards                                C     |  /|\ j increasing northwards
80  C     |   |                                                        C     |   |
81  C     |   |                                                        C     |   |
82  C     |   ======>E, x increasing eastwards                          C     |   ======>E, x increasing eastwards
83  C     |             i increasing eastwards                          C     |             i increasing eastwards
84  C     |                                                            C     |
85  C     |    i: East-west index                                      C     |    i: East-west index
86  C     |    j: North-south index                                    C     |    j: North-south index
87  C     |    k: up-down index                                        C     |    k: up-down index
88  C     |    U: x-velocity (m/s)                                      C     |    U: x-velocity (m/s)
89  C     |    V: y-velocity (m/s)                                      C     |    V: y-velocity (m/s)
90  C     |    T: potential temperature (oC)                            C     |    T: potential temperature (oC)
91  C     | "SB": Southern boundary                                    C     | "SB": Southern boundary
92  C     | "WB": Western boundary                                      C     | "WB": Western boundary
93  C     |"PWX": Periodic wrap around in X.                            C     |"PWX": Periodic wrap around in X.
94  C     |"PWY": Periodic wrap around in Y.                            C     |"PWY": Periodic wrap around in Y.
95  C     |----------------------------------------------------------  C     |----------------------------------------------------------
96  C     | (2) South elevation schematic of model grid                C     | (2) South elevation schematic of model grid
97  C     |     =======================================                C     |     =======================================
98  C     |     This diagram shows the location of the model            C     |     This diagram shows the location of the model
99  C     |     prognostic variables on the model grid. The "T"        C     |     prognostic variables on the model grid. The "T"
100  C     |     location is used for all tracers. The figure also      C     |     location is used for all tracers. The figure also
101  C     |     shows the upper most, western most indexing            C     |     shows the upper most, western most indexing
102  C     |     convention that is used for all model variables.        C     |     convention that is used for all model variables.
103  C     |                                                            C     |
104  C     |      "WB"                                                  C     |      "WB"
105  C     |       +                                                    C     |       +
106  C     |       +                                                    C     |       +
107  C     |      \+/       /|\                       /|\       .  C     |      \+/       /|\                       /|\       .
108  C     |"UB"++>|-------- | -----------------etc..  | ----*---        C     |"UB"++>|-------- | -----------------etc..  | ----*---
109  C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |        C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |
110  C     |       |         j=1,        |             j=1,  *  |        C     |       |         j=1,        |             j=1,  *  |
111  C     |       |         k=1)        |             k=1)  *  |        C     |       |         k=1)        |             k=1)  *  |
112  C     |       |                     |                   *  |        C     |       |                     |                   *  |
113  C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U      C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U
114  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,
115  C     |  k=1) |        j=1,         |  k=1)      j=1,   *  |j=1,    C     |  k=1) |        j=1,         |  k=1)      j=1,   *  |j=1,
116  C     |       |        k=1)         |            k=1)   *  |k=1)    C     |       |        k=1)         |            k=1)   *  |k=1)
117  C     |       |                     |                   *  |        C     |       |                     |                   *  |
118  C     |       |        /|\          |            /|\    *  |        C     |       |        /|\          |            /|\    *  |
119  C     |       |-------- | -----------------etc..  | ----*---        C     |       |-------- | -----------------etc..  | ----*---
120  C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |        C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |
121  C     |       |         j=1,        |             j=1,  *  |        C     |       |         j=1,        |             j=1,  *  |
122  C     |       |         k=2)        |             k=2)  *  |        C     |       |         k=2)        |             k=2)  *  |
123  C     |                                                            C     |
124  C     |       .                     .                      .        C     |       .                     .                      .
125  C     |       .                     .                      .        C     |       .                     .                      .
126  C     |       .                     .                      .        C     |       .                     .                      .
127  C     |       e                     e                   *  e        C     |       e                     e                   *  e
128  C     |       t                     t                   *  t        C     |       t                     t                   *  t
129  C     |       c                     c                   *  c        C     |       c                     c                   *  c
130  C     |       |                     |                   *  |        C     |       |                     |                   *  |
131  C     |       |                     |                   *  |        C     |       |                     |                   *  |
132  C     |       |                     |                   *  |        C     |       |                     |                   *  |
133  C     |       |                     |                   *  |        C     |       |                     |                   *  |
134  C     |       |        /|\          |            /|\    *  |        C     |       |        /|\          |            /|\    *  |
135  C     |       |-------- | -----------------etc..  | ----*---        C     |       |-------- | -----------------etc..  | ----*---
136  C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |        C     |       |    rVel(i=1,        |        rVel(i=Nx, *  |
137  C     |       |         j=1,        |             j=1,  *  |        C     |       |         j=1,        |             j=1,  *  |
138  C     |       |         k=Nr)       |             k=Nr) *  |        C     |       |         k=Nr)       |             k=Nr) *  |
139  C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U      C     |U(i=1, ==>       x         ==>U(i=2,       x     *==>U
140  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,  C     |  j=1, |      T(i=1,         |  j=1,    T(i=Nx,  *(i=Nx+1,
141  C     |  k=Nr)|        j=1,         |  k=Nr)     j=1,   *  |j=1,    C     |  k=Nr)|        j=1,         |  k=Nr)     j=1,   *  |j=1,
142  C     |       |        k=Nr)        |            k=Nr)  *  |k=Nr)  C     |       |        k=Nr)        |            k=Nr)  *  |k=Nr)
143  C     |       |                     |                   *  |        C     |       |                     |                   *  |
144  C     |"LB"++>==============================================        C     |"LB"++>==============================================
145  C     |                                               "PWX"        C     |                                               "PWX"
146  C     |                                                            C     |
147  C     | Up   increasing upwards.                                    C     | Up   increasing upwards.
148  C     |/|\                                                       .  C     |/|\                                                       .
149  C     | |                                                          C     | |
150  C     | |                                                          C     | |
151  C     | =====> E  i increasing eastwards                            C     | =====> E  i increasing eastwards
152  C     | |         x increasing eastwards                            C     | |         x increasing eastwards
153  C     | |                                                          C     | |
154  C     |\|/                                                          C     |\|/
155  C     | Down,k increasing downwards.                                C     | Down,k increasing downwards.
156  C     |                                                            C     |
157  C     | Note: r => height (m) => r increases upwards                C     | Note: r => height (m) => r increases upwards
158  C     |       r => pressure (Pa) => r increases downwards          C     |       r => pressure (Pa) => r increases downwards
159  C     |                                                            C     |
160  C     |                                                            C     |
161  C     |    i: East-west index                                      C     |    i: East-west index
162  C     |    j: North-south index                                    C     |    j: North-south index
163  C     |    k: up-down index                                        C     |    k: up-down index
164  C     |    U: x-velocity (m/s)                                      C     |    U: x-velocity (m/s)
165  C     | rVel: z-velocity ( units of r )                            C     | rVel: z-velocity ( units of r )
166  C     |       The vertical velocity variable rVel is in units of    C     |       The vertical velocity variable rVel is in units of
167  C     |       "r" the vertical coordinate. r in m will give        C     |       "r" the vertical coordinate. r in m will give
168  C     |       rVel m/s. r in Pa will give rVel Pa/s.                C     |       rVel m/s. r in Pa will give rVel Pa/s.
169  C     |    T: potential temperature (oC)                            C     |    T: potential temperature (oC)
170  C     | "UB": Upper boundary.                                      C     | "UB": Upper boundary.
171  C     | "LB": Lower boundary (always solid - therefore om|w == 0)  C     | "LB": Lower boundary (always solid - therefore om|w == 0)
172  C     | "WB": Western boundary                                      C     | "WB": Western boundary
173  C     |"PWX": Periodic wrap around in X.                            C     |"PWX": Periodic wrap around in X.
174  C     |----------------------------------------------------------  C     |----------------------------------------------------------
175  C     | (3) Views showing nomenclature and indexing                C     | (3) Views showing nomenclature and indexing
176  C     |     for grid descriptor variables.                          C     |     for grid descriptor variables.
177  C     |                                                            C     |
178  C     |      Fig 3a. shows the orientation, indexing and            C     |      Fig 3a. shows the orientation, indexing and
179  C     |      notation for the grid spacing terms used internally    C     |      notation for the grid spacing terms used internally
180  C     |      for the evaluation of gradient and averaging terms.    C     |      for the evaluation of gradient and averaging terms.
181  C     |      These varaibles are set based on the model input      C     |      These varaibles are set based on the model input
182  C     |      parameters which define the model grid in terms of    C     |      parameters which define the model grid in terms of
183  C     |      spacing in X, Y and Z.                                C     |      spacing in X, Y and Z.
184  C     |                                                            C     |
185  C     |      Fig 3b. shows the orientation, indexing and            C     |      Fig 3b. shows the orientation, indexing and
186  C     |      notation for the variables that are used to define    C     |      notation for the variables that are used to define
187  C     |      the model grid. These varaibles are set directly      C     |      the model grid. These varaibles are set directly
188  C     |      from the model input.                                  C     |      from the model input.
189  C     |                                                            C     |
190  C     | Figure 3a                                                  C     | Figure 3a
191  C     | =========                                                  C     | =========
192  C     |       |------------------------------------                C     |       |------------------------------------
193  C     |       |                       |                            C     |       |                       |
194  C     |"PWY"********************************* etc...                C     |"PWY"********************************* etc...
195  C     |       |                       |                            C     |       |                       |
196  C     |       |                       |                            C     |       |                       |
197  C     |       |                       |                            C     |       |                       |
198  C     |       |                       |                            C     |       |                       |
199  C     |       |                       |                            C     |       |                       |
200  C     |       |                       |                            C     |       |                       |
201  C     |       |                       |                            C     |       |                       |
202  C     |                                                            C     |
203  C     |       .                       .                            C     |       .                       .
204  C     |       .                       .                            C     |       .                       .
205  C     |       .                       .                            C     |       .                       .
206  C     |       e                       e                            C     |       e                       e
207  C     |       t                       t                            C     |       t                       t
208  C     |       c                       c                            C     |       c                       c
209  C     |       |-----------v-----------|-----------v----------|-    C     |       |-----------v-----------|-----------v----------|-
210  C     |       |                       |                      |      C     |       |                       |                      |
211  C     |       |                       |                      |      C     |       |                       |                      |
212  C     |       |                       |                      |      C     |       |                       |                      |
213  C     |       |                       |                      |      C     |       |                       |                      |
214  C     |       |                       |                      |      C     |       |                       |                      |
215  C     |       u<--dxF(i=1,j=2,k=1)--->u           t          |      C     |       u<--dxF(i=1,j=2,k=1)--->u           t          |
216  C     |       |/|\       /|\          |                      |      C     |       |/|\       /|\          |                      |
217  C     |       | |         |           |                      |      C     |       | |         |           |                      |
218  C     |       | |         |           |                      |      C     |       | |         |           |                      |
219  C     |       | |         |           |                      |      C     |       | |         |           |                      |
220  C     |       |dyU(i=1,  dyC(i=1,     |                      |      C     |       |dyU(i=1,  dyC(i=1,     |                      |
221  C     | ---  ---|--j=2,---|--j=2,-----------------v----------|-    C     | ---  ---|--j=2,---|--j=2,-----------------v----------|-
222  C     | /|\   | |  k=1)   |  k=1)     |          /|\         |      C     | /|\   | |  k=1)   |  k=1)     |          /|\         |
223  C     |  |    | |         |           |          dyF(i=2,    |      C     |  |    | |         |           |          dyF(i=2,    |
224  C     |  |    | |         |           |           |  j=1,    |      C     |  |    | |         |           |           |  j=1,    |
225  C     |dyG(   |\|/       \|/          |           |  k=1)    |      C     |dyG(   |\|/       \|/          |           |  k=1)    |
226  C     |   i=1,u---        t<---dxC(i=2,j=1,k=1)-->t          |      C     |   i=1,u---        t<---dxC(i=2,j=1,k=1)-->t          |
227  C     |   j=1,|                       |           |          |      C     |   j=1,|                       |           |          |
228  C     |   k=1)|                       |           |          |      C     |   k=1)|                       |           |          |
229  C     |  |    |                       |           |          |      C     |  |    |                       |           |          |
230  C     |  |    |                       |           |          |      C     |  |    |                       |           |          |
231  C     | \|/   |           |<---dxV(i=2,j=1,k=1)--\|/         |      C     | \|/   |           |<---dxV(i=2,j=1,k=1)--\|/         |
232  C     |"SB"++>|___________v___________|___________v__________|_    C     |"SB"++>|___________v___________|___________v__________|_
233  C     |       <--dxG(i=1,j=1,k=1)----->                            C     |       <--dxG(i=1,j=1,k=1)----->
234  C     |      /+\                                              .  C     |      /+\                                              .
235  C     |       +                                                    C     |       +
236  C     |       +                                                    C     |       +
237  C     |     "WB"                                                    C     |     "WB"
238  C     |                                                            C     |
239  C     |   N, y increasing northwards                                C     |   N, y increasing northwards
240  C     |  /|\ j increasing northwards                                C     |  /|\ j increasing northwards
241  C     |   |                                                        C     |   |
242  C     |   |                                                        C     |   |
243  C     |   ======>E, x increasing eastwards                          C     |   ======>E, x increasing eastwards
244  C     |             i increasing eastwards                          C     |             i increasing eastwards
245  C     |                                                            C     |
246  C     |    i: East-west index                                      C     |    i: East-west index
247  C     |    j: North-south index                                    C     |    j: North-south index
248  C     |    k: up-down index                                        C     |    k: up-down index
249  C     |    u: x-velocity point                                      C     |    u: x-velocity point
250  C     |    V: y-velocity point                                      C     |    V: y-velocity point
251  C     |    t: tracer point                                          C     |    t: tracer point
252  C     | "SB": Southern boundary                                    C     | "SB": Southern boundary
253  C     | "WB": Western boundary                                      C     | "WB": Western boundary
254  C     |"PWX": Periodic wrap around in X.                            C     |"PWX": Periodic wrap around in X.
255  C     |"PWY": Periodic wrap around in Y.                            C     |"PWY": Periodic wrap around in Y.
256  C     |                                                            C     |
257  C     | Figure 3b                                                  C     | Figure 3b
258  C     | =========                                                  C     | =========
259  C     |                                                            C     |
260  C     |       .                       .                            C     |       .                       .
261  C     |       .                       .                            C     |       .                       .
262  C     |       .                       .                            C     |       .                       .
263  C     |       e                       e                            C     |       e                       e
264  C     |       t                       t                            C     |       t                       t
265  C     |       c                       c                            C     |       c                       c
266  C     |       |-----------v-----------|-----------v--etc...        C     |       |-----------v-----------|-----------v--etc...
267  C     |       |                       |                            C     |       |                       |
268  C     |       |                       |                            C     |       |                       |
269  C     |       |                       |                            C     |       |                       |
270  C     |       |                       |                            C     |       |                       |
271  C     |       |                       |                            C     |       |                       |
272  C     |       u<--delX(i=1)---------->u           t                C     |       u<--delX(i=1)---------->u           t
273  C     |       |                       |                            C     |       |                       |
274  C     |       |                       |                            C     |       |                       |
275  C     |       |                       |                            C     |       |                       |
276  C     |       |                       |                            C     |       |                       |
277  C     |       |                       |                            C     |       |                       |
278  C     |       |-----------v-----------------------v--etc...        C     |       |-----------v-----------------------v--etc...
279  C     |       |          /|\          |                            C     |       |          /|\          |
280  C     |       |           |           |                            C     |       |           |           |
281  C     |       |           |           |                            C     |       |           |           |
282  C     |       |           |           |                            C     |       |           |           |
283  C     |       u        delY(j=1)      |           t                C     |       u        delY(j=1)      |           t
284  C     |       |           |           |                            C     |       |           |           |
285  C     |       |           |           |                            C     |       |           |           |
286  C     |       |           |           |                            C     |       |           |           |
287  C     |       |           |           |                            C     |       |           |           |
288  C     |       |          \|/          |                            C     |       |          \|/          |
289  C     |"SB"++>|___________v___________|___________v__etc...        C     |"SB"++>|___________v___________|___________v__etc...
290  C     |      /+\                                                 .  C     |      /+\                                                 .
291  C     |       +                                                    C     |       +
292  C     |       +                                                    C     |       +
293  C     |     "WB"                                                    C     |     "WB"
294  C     |                                                            C     |
295  C     *==========================================================*  C     *==========================================================*
296  C     \ev  C     \ev
297  CEOP  CEOP
# Line 299  CEOP Line 299  CEOP
299  C     Macros that override/modify standard definitions  C     Macros that override/modify standard definitions
300  #include "GRID_MACROS.h"  #include "GRID_MACROS.h"
301    
302  C  C--   COMMON /GRID_RL/ RL valued grid defining variables.
303  C--   COMMON /GRID_R/ REAL valued grid defining variables.  C     deepFacC  :: deep-model grid factor (fct of vertical only) for dx,dy
304  C     dxC    - Cell center separation in X across western cell wall (m)  C     deepFacF     at level-center (deepFacC)  and level interface (deepFacF)
305  C     dxG    - Cell face separation in X along southern cell wall (m)  C     deepFac2C :: deep-model grid factor (fct of vertical only) for area dx*dy
306  C     dxF    - Cell face separation in X thru cell center (m)  C     deepFac2F    at level-center (deepFac2C) and level interface (deepFac2F)
307  C     dxV    - V-point separation in X across south-west corner of cell (m)  C     gravitySign :: indicates the direction of gravity relative to R direction
308  C     dyC    - Cell center separation in Y across southern cell wall (m)  C                   (= -1 for R=Z (Z increases upward, -gravity direction  )
309  C     dyG    - Cell face separation in Y along western cell wall (m)  C                   (= +1 for R=P (P increases downward, +gravity direction)
310  C     dyF    - Cell face separation in Y thru cell center (m)  C     rkSign     :: Vertical coordinate to vertical index orientation.
311  C     dyU    - U-point separation in Y across south-west corner of cell (m)  C                   ( +1 same orientation, -1 opposite orientation )
312  C     drC    - Cell center separation along Z axis ( units of r ).  C     globalArea :: Domain Integrated horizontal Area [m2]
313  C     drF    - Cell face separation along Z axis ( units of r ).        COMMON /GRID_RL/
314  C     Rcolumn  -Total thickness (in r_unit) of the fluid column       &  cosFacU, cosFacV, sqCosFacU, sqCosFacV,
315  C     R_low  - base of fluid in r_unit (Depth(m) / Pressure(Pa) at top Atmos.)       &  deepFacC, deepFac2C, recip_deepFacC, recip_deepFac2C,
316  C     Ro_surf- surface reference (at rest) position, r_unit.       &  deepFacF, deepFac2F, recip_deepFacF, recip_deepFac2F,
317  C     hFac   - Fraction of cell in vertical which is open i.e how       &  gravitySign, rkSign, globalArea
318          _RL cosFacU        (1-Oly:sNy+Oly,nSx,nSy)
319          _RL cosFacV        (1-Oly:sNy+Oly,nSx,nSy)
320          _RL sqCosFacU      (1-Oly:sNy+Oly,nSx,nSy)
321          _RL sqCosFacV      (1-Oly:sNy+Oly,nSx,nSy)
322          _RL deepFacC       (Nr)
323          _RL deepFac2C      (Nr)
324          _RL deepFacF       (Nr+1)
325          _RL deepFac2F      (Nr+1)
326          _RL recip_deepFacC (Nr)
327          _RL recip_deepFac2C(Nr)
328          _RL recip_deepFacF (Nr+1)
329          _RL recip_deepFac2F(Nr+1)
330          _RL gravitySign
331          _RL rkSign
332          _RL globalArea
333    
334    C--   COMMON /GRID_RS/ RS valued grid defining variables.
335    C     dxC     :: Cell center separation in X across western cell wall (m)
336    C     dxG     :: Cell face separation in X along southern cell wall (m)
337    C     dxF     :: Cell face separation in X thru cell center (m)
338    C     dxV     :: V-point separation in X across south-west corner of cell (m)
339    C     dyC     :: Cell center separation in Y across southern cell wall (m)
340    C     dyG     :: Cell face separation in Y along western cell wall (m)
341    C     dyF     :: Cell face separation in Y thru cell center (m)
342    C     dyU     :: U-point separation in Y across south-west corner of cell (m)
343    C     drC     :: Cell center separation along Z axis ( units of r ).
344    C     drF     :: Cell face separation along Z axis ( units of r ).
345    C     R_low   :: base of fluid in r_unit (Depth(m) / Pressure(Pa) at top Atmos.)
346    C     rLowW   :: base of fluid column in r_unit at Western  edge location.
347    C     rLowS   :: base of fluid column in r_unit at Southern edge location.
348    C     Ro_surf :: surface reference (at rest) position, r_unit.
349    C     rSurfW  :: surface reference position at Western  edge location [r_unit].
350    C     rSurfS  :: surface reference position at Southern edge location [r_unit].
351    C     hFac    :: Fraction of cell in vertical which is open i.e how
352  C              "lopped" a cell is (dimensionless scale factor).  C              "lopped" a cell is (dimensionless scale factor).
353  C              Note: The code needs terms like MIN(hFac,hFac(I+1))  C              Note: The code needs terms like MIN(hFac,hFac(I+1))
354  C                    On some platforms it may be better to precompute  C                    On some platforms it may be better to precompute
355  C                    hFacW, hFacE, ... here than do MIN on the fly.  C                    hFacW, hFacE, ... here than do MIN on the fly.
356  C     rkFac     - Vertical coordinate to vertical index orientation.  cC    maskH   :: cell Center full-column mask (= 2D mask)
357  C                 ( -1 same orientation, 1 opposite orientation )  C     maskInC :: Cell Center 2-D Interior mask (i.e., zero beyond OB)
358  C                 ( vertical coord == m  -> rkFac =  1 )  C     maskInW :: West  face 2-D Interior mask (i.e., zero on and beyond OB)
359  C                 ( vertical coord == Pa -> rkFac = -1 )  C     maskInS :: South face 2-D Interior mask (i.e., zero on and beyond OB)
360  C     maskH  - cell Center full-column mask (= 2D mask)  C     maskC   :: cell Center land mask
361  C     maskC  - cell Center land mask  C     maskW   :: West face land mask
362  C     maskW  - West face land mask  C     maskS   :: South face land mask
363  C     maskS  - South face land mask  C     recip_dxC   :: Reciprocal of dxC
364  C     recip_dxC   - Recipricol of dxC  C     recip_dxG   :: Reciprocal of dxG
365  C     recip_dxG   - Recipricol of dxG  C     recip_dxF   :: Reciprocal of dxF
366  C     recip_dxF   - Recipricol of dxF  C     recip_dxV   :: Reciprocal of dxV
367  C     recip_dxV   - Recipricol of dxV  C     recip_dyC   :: Reciprocal of dxC
368  C     recip_dyC   - Recipricol of dxC  C     recip_dyG   :: Reciprocal of dyG
369  C     recip_dyG   - Recipricol of dyG  C     recip_dyF   :: Reciprocal of dyF
370  C     recip_dyF   - Recipricol of dyF  C     recip_dyU   :: Reciprocal of dyU
371  C     recip_dyU   - Recipricol of dyU  C     recip_drC   :: Reciprocal of drC
372  C     recip_drC   - Recipricol of drC  C     recip_drF   :: Reciprocal of drF
373  C     recip_drF   - Recipricol of drF  C     recip_Rcol  :: Inverse of cell center column thickness (1/r_unit)
374  C     recip_Rcol  - Inverse of cell center column thickness (1/r_unit)  C     recip_hFacC :: Inverse of cell open-depth f[X,Y,Z] ( dimensionless ).
375  C     recip_hFacC - Inverse of cell open-depth f[X,Y,Z] ( dimensionless ).  C     recip_hFacW    rhFacC center, rhFacW west, rhFacS south.
376  C     recip_hFacW   rhFacC center, rhFacW west, rhFacS south.  C     recip_hFacS    Note: This is precomputed here because it involves division.
377  C     recip_hFacS   Note: This is precomputed here because it involves division.  C     xC        :: X-coordinate of cell center f[X,Y]. The units of xc, yc
378  C     saFac  - Shallow atmosphere factor (dimensionless scale factor).  C                  depend on the grid. They are not used in differencing or
379  C     xC     - X-coordinate of center of cell f[X,Y]. The units of xc, yc  C                  averaging but are just a convient quantity for I/O,
380  C              depend on the grid. They are not used in differencing or  C                  diagnostics etc.. As such xc is in m for cartesian
381  C              averaging but are just a convient quantity for I/O,  C                  coordinates but degrees for spherical polar.
382  C              diagnostics etc.. As such xc is in m for cartesian  C     yC        :: Y-coordinate of center of cell f[X,Y].
383  C              coordinates but degrees for spherical polar.  C     yG        :: Y-coordinate of corner of cell ( c-grid vorticity point) f[X,Y].
384  C     yC     - Y-coordinate of center of cell f[X,Y].  C     rA        :: R-face are f[X,Y] ( m^2 ).
385  C     yG     - Y-coordinate of corner of cell ( c-grid vorticity point) f[X,Y].  C                  Note: In a cartesian framework zA is simply dx*dy,
386  C     xC0, yC0 - West edge x coord  ( metres or degrees )  C                      however we use zA to allow for non-globally
387  C                South edge y coord ( metres or degrees )  C                      orthogonal coordinate frames (with appropriate
388  C     rA     - R-face are f[X,Y] ( m^2 ).  C                      metric terms).
389  C              Note: In a cartesian framework zA is simply dx*dy,  C     rC        :: R-coordinate of center of cell f[Z] (units of r).
390  C                    however we use zA to allow for non-globally  C     rF        :: R-coordinate of face of cell f[Z] (units of r).
391  C                    orthogonal coordinate frames (with appropriate  C     tanPhiAtU :: tan of the latitude at U point. Used for spherical polar
392  C                    metric terms).  C                  metric term in U equation.
393  C     rC     - R-coordinate of center of cell f[Z] (units of r).  C     tanPhiAtV :: tan of the latitude at V point. Used for spherical polar
394  C     rF     - R-coordinate of face of cell f[Z] (units of r).  C                  metric term in V equation.
395  C     tanPhiAtU - tan of the latitude at U point. Used for spherical polar  C     angleCosC :: cosine of grid orientation angle relative to Geographic direction
396  C                 metric term in U equation.  C               at cell center: alpha=(Eastward_dir,grid_uVel_dir)=(North_d,vVel_d)
397  C     tanPhiAtV - tan of the latitude at V point. Used for spherical polar  C     angleSinC :: sinus  of grid orientation angle relative to Geographic direction
398  C                 metric term in V equation.  C               at cell center: alpha=(Eastward_dir,grid_uVel_dir)=(North_d,vVel_d)
399        COMMON /GRID_R/  C     fCori     :: Coriolis parameter at grid Center point
400    C     fCoriG    :: Coriolis parameter at grid Corner point
401    C     fCoriCos  :: Coriolis Cos(phi) parameter at grid Center point (for NH)
402    
403          COMMON /GRID_RS/
404       &  dxC,dxF,dxG,dxV,dyC,dyF,dyG,dyU,       &  dxC,dxF,dxG,dxV,dyC,dyF,dyG,dyU,
405       &  R_low,Ro_surf,HFacC,HFacW,HFacS,       &  R_low, rLowW, rLowS,
406         &  Ro_surf, rSurfW, rSurfS,
407         &  hFacC, hFacW, hFacS,
408       &  recip_dxC,recip_dxF,recip_dxG,recip_dxV,       &  recip_dxC,recip_dxF,recip_dxG,recip_dxV,
409       &  recip_dyC,recip_dyF,recip_dyG,recip_dyU,       &  recip_dyC,recip_dyF,recip_dyG,recip_dyU,
410       &  recip_Rcol,       &  recip_Rcol,
411       &  recip_hFacC,recip_hFacW,recip_hFacS,       &  recip_hFacC,recip_hFacW,recip_hFacS,
      &  saFac,  
412       &  xC,yC,rA,rAw,rAs,rAz,xG,yG,       &  xC,yC,rA,rAw,rAs,rAz,xG,yG,
413       &  maskH, maskC,maskW,maskS,       &  maskInC, maskInW, maskInS,
414         &  maskC, maskW, maskS,
415       &  recip_rA,recip_rAw,recip_rAs,recip_rAz,       &  recip_rA,recip_rAw,recip_rAs,recip_rAz,
416       &  tanPhiAtU, tanPhiAtV,       &  drC, drF, recip_drC, recip_drF, rC, rF,
417       &  cosfacU,cosfacV,sqcosfacU,sqcosfacV,       &  tanPhiAtU, tanPhiAtV, angleCosC, angleSinC,
418       &  drC,drF,recip_drC,recip_drF,rC,rF,       &  fCori, fCoriG, fCoriCos
419       &  rkFac, recip_rkFac, xC0, yC0  c    & , maskH
420        _RS dxC            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dxC            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
421        _RS dxF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dxF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
422        _RS dxG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dxG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
# Line 386  C                 metric term in V equat Line 426  C                 metric term in V equat
426        _RS dyG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dyG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
427        _RS dyU            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dyU            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
428        _RS R_low          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS R_low          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
429          _RS rLowW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
430          _RS rLowS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
431        _RS Ro_surf        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS Ro_surf        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
432        _RS HFacC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS rSurfW         (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
433        _RS HFacW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS rSurfS         (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
434        _RS HFacS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS hFacC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
435          _RS hFacW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
436          _RS hFacS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
437        _RS recip_dxC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dxC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
438        _RS recip_dxF      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dxF      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
439        _RS recip_dxG      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dxG      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
# Line 399  C                 metric term in V equat Line 443  C                 metric term in V equat
443        _RS recip_dyG      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dyG      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
444        _RS recip_dyU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dyU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
445        _RS recip_Rcol     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_Rcol     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
446        _RS recip_hFacC    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS recip_hFacC    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
447        _RS recip_hFacW    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS recip_hFacW    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
448        _RS recip_hFacS    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS recip_hFacS    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
449        _RS xC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS xC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
450        _RS xG             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS xG             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
451        _RS yC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS yC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
# Line 414  C                 metric term in V equat Line 458  C                 metric term in V equat
458        _RS recip_rAw      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_rAw      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
459        _RS recip_rAs      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_rAs      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
460        _RS recip_rAz      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_rAz      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
461        _RS maskH          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  c     _RS maskH          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
462        _RS maskC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS maskInC        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
463        _RS maskW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS maskInW        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
464        _RS maskS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS maskInS        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
465          _RS maskC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
466          _RS maskW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
467          _RS maskS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
468          _RS drC            (Nr)
469          _RS drF            (Nr)
470          _RS recip_drC      (Nr)
471          _RS recip_drF      (Nr)
472          _RS rC             (Nr)
473          _RS rF             (Nr+1)
474        _RS tanPhiAtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS tanPhiAtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
475        _RS tanPhiAtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS tanPhiAtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
476        _RL cosfacU(1-Oly:sNy+Oly,nSx,nSy)        _RS angleCosC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
477        _RL cosfacV(1-Oly:sNy+Oly,nSx,nSy)        _RS angleSinC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
478        _RL sqcosfacU(1-Oly:sNy+Oly,nSx,nSy)        _RS fCori          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
479        _RL sqcosfacV(1-Oly:sNy+Oly,nSx,nSy)        _RS fCoriG         (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
480        _RS drC            (1:Nr)        _RS fCoriCos       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
481        _RS drF            (1:Nr)  
482        _RS recip_drC      (1:Nr)  #ifdef ALLOW_DEPTH_CONTROL
483        _RS recip_drF      (1:Nr)  C--   COMMON /GRID_DEPTH_CTRL/ grid defining variables for Depth Control code.
484        _RS saFac          (1:Nr)  C     xx_r_low  :: in TAF-sense active replacement of R_low
485        _RS rC             (1:Nr)        COMMON /GRID_DEPTH_CTRL/
486        _RS rF             (1:Nr+1)       &  xx_r_low
487        _RS rkFac        _RL xx_r_low       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
488        _RS recip_rkFac  #endif /* ALLOW_DEPTH_CONTROL */
489        _RS xC0  
490        _RS yC0  C--   COMMON /GRID_I/ INTEGER valued grid defining variables.
491    C     kSurfC  :: vertical index of the surface tracer cell
492    C     kSurfW  :: vertical index of the surface U point
493    C     kSurfS  :: vertical index of the surface V point
494    C     kLowC   :: index of the r-lowest "wet cell" (2D)
495    C IMPORTANT: ksurfC,W,S = Nr+1 and kLowC = 0 where the fluid column
496    C            is empty (continent)
497          COMMON /GRID_I/
498         &  kSurfC, kSurfW, kSurfS,
499         &  kLowC
500          INTEGER kSurfC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
501          INTEGER kSurfW(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
502          INTEGER kSurfS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
503          INTEGER kLowC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
504    
505  #ifdef ALLOW_NONHYDROSTATIC  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
       COMMON /GRID_NH/  
      &  recip_hFacU  
       _RS recip_hFacU    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)  
 #endif  

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.22