/[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.10 by cnh, Tue Sep 29 18:50:56 1998 UTC revision 1.22 by edhill, Thu Oct 9 04:19:18 2003 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    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    #include "PACKAGES_CONFIG.h"
300    
301  C     Macros that override/modify standard definitions  C     Macros that override/modify standard definitions
302  #include "GRID_MACROS.h"  #include "GRID_MACROS.h"
# Line 303  C     dyF    - Cell face separation in Y Line 313  C     dyF    - Cell face separation in Y
313  C     dyU    - U-point separation in Y across south-west corner of cell (m)  C     dyU    - U-point separation in Y across south-west corner of cell (m)
314  C     drC    - Cell center separation along Z axis ( units of r ).  C     drC    - Cell center separation along Z axis ( units of r ).
315  C     drF    - Cell face separation along Z axis ( units of r ).  C     drF    - Cell face separation along Z axis ( units of r ).
316  C     H      - Depth of base of fluid from upper surface f[X,Y] (m).  C     Rcolumn  -Total thickness (in r_unit) of the fluid column
317    C     R_low  - base of fluid in r_unit (Depth(m) / Pressure(Pa) at top Atmos.)
318    C     Ro_surf- surface reference (at rest) position, r_unit.
319    C     klowC  - index of the lowest "wet cell" (2D)
320  C     hFac   - Fraction of cell in vertical which is open i.e how  C     hFac   - Fraction of cell in vertical which is open i.e how
321  C              "lopped" a cell is (dimensionless scale factor).  C              "lopped" a cell is (dimensionless scale factor).
322  C              Note: The code needs terms like MIN(hFac,hFac(I+1))  C              Note: The code needs terms like MIN(hFac,hFac(I+1))
323  C                    On some platforms it may be better to precompute  C                    On some platforms it may be better to precompute
324  C                    hFacW, hFacE, ... here than do MIN on the fly.  C                    hFacW, hFacE, ... here than do MIN on the fly.
325    C     gravitySign - indicates whether gravity points in the opposite
326    C                   direction of R or not.
327    C                 ( = +1 for R=Z (gravity points downward in Z)
328    C                 ( = -1 for R=P (gravity points upward in P)
329  C     rkFac     - Vertical coordinate to vertical index orientation.  C     rkFac     - Vertical coordinate to vertical index orientation.
330  C                 ( -1 same orientation, 1 opposite orientation )  C                 ( -1 same orientation, 1 opposite orientation )
331  C                 ( vertical coord == m  -> rkFac =  1 )  C                 ( vertical coord == m  -> rkFac =  1 )
332  C                 ( vertical coord == Pa -> rkFac = -1 )  C                 ( vertical coord == Pa -> rkFac = -1 )
333    C     maskH  - cell Center full-column mask (= 2D mask)
334    C     maskC  - cell Center land mask
335  C     maskW  - West face land mask  C     maskW  - West face land mask
336  C     maskS  - South face land mask  C     maskS  - South face land mask
337  C     recip_dxC   - Recipricol of dxC  C     recip_dxC   - Recipricol of dxC
# Line 325  C     recip_dyF   - Recipricol of dyF Line 344  C     recip_dyF   - Recipricol of dyF
344  C     recip_dyU   - Recipricol of dyU  C     recip_dyU   - Recipricol of dyU
345  C     recip_drC   - Recipricol of drC  C     recip_drC   - Recipricol of drC
346  C     recip_drF   - Recipricol of drF  C     recip_drF   - Recipricol of drF
347  C     recip_H     - Inverse of cell center open-depth  C     recip_Rcol  - Inverse of cell center column thickness (1/r_unit)
348  C     recip_hFacC - Inverse of cell open-depth f[X,Y,Z] ( dimensionless ).  C     recip_hFacC - Inverse of cell open-depth f[X,Y,Z] ( dimensionless ).
349  C     recip_hFacW   rhFacC center, rhFacW west, rhFacS south.  C     recip_hFacW   rhFacC center, rhFacW west, rhFacS south.
350  C     recip_hFacS   Note: This is precomputed here because it involves division.  C     recip_hFacS   Note: This is precomputed here because it involves division.
# Line 336  C              averaging but are just a Line 355  C              averaging but are just a
355  C              diagnostics etc.. As such xc is in m for cartesian  C              diagnostics etc.. As such xc is in m for cartesian
356  C              coordinates but degrees for spherical polar.  C              coordinates but degrees for spherical polar.
357  C     yC     - Y-coordinate of center of cell f[X,Y].  C     yC     - Y-coordinate of center of cell f[X,Y].
358    C     yG     - Y-coordinate of corner of cell ( c-grid vorticity point) f[X,Y].
359  C     xC0, yC0 - West edge x coord  ( metres or degrees )  C     xC0, yC0 - West edge x coord  ( metres or degrees )
360  C                South edge y coord ( metres or degrees )  C                South edge y coord ( metres or degrees )
361  C     rA     - R-face are f[X,Y] ( m^2 ).  C     rA     - R-face are f[X,Y] ( m^2 ).
# Line 349  C     tanPhiAtU - tan of the latitude at Line 369  C     tanPhiAtU - tan of the latitude at
369  C                 metric term in U equation.  C                 metric term in U equation.
370  C     tanPhiAtV - tan of the latitude at V point. Used for spherical polar  C     tanPhiAtV - tan of the latitude at V point. Used for spherical polar
371  C                 metric term in V equation.  C                 metric term in V equation.
372          COMMON /GRID_I/ klowC
373          INTEGER klowC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
374    
375        COMMON /GRID_R/        COMMON /GRID_R/
376       &  dxC,dxF,dxG,dxV,dyC,dyF,dyG,dyU,drC,drF,       &  dxC,dxF,dxG,dxV,dyC,dyF,dyG,dyU,
377       &  H,HFacC,HFacW,HFacS,DepthInK,       &  R_low,Ro_surf,HFacC,HFacW,HFacS,
378       &  recip_dxC,recip_dxF,recip_dxG,recip_dxV,       &  recip_dxC,recip_dxF,recip_dxG,recip_dxV,
379       &  recip_dyC,recip_dyF,recip_dyG,recip_dyU,       &  recip_dyC,recip_dyF,recip_dyG,recip_dyU,
380       &  recip_drC,recip_drF,       &  recip_Rcol,
      &  recip_H,  
381       &  recip_hFacC,recip_hFacW,recip_hFacS,       &  recip_hFacC,recip_hFacW,recip_hFacS,
      &  rkFac, recip_rkFac,  
382       &  saFac,       &  saFac,
383       &  xC,yC,rA,rC,rF,yC0,xC0,       &  xC,yC,rA,rAw,rAs,rAz,xG,yG,
384       &  maskW,maskS,       &  maskH, maskC,maskW,maskS,
385       &  tanPhiAtU, tanPhiAtV       &  recip_rA,recip_rAw,recip_rAs,recip_rAz,
386         &  tanPhiAtU, tanPhiAtV,
387         &  cosfacU,cosfacV,sqcosfacU,sqcosfacV,
388         &  drC,drF,recip_drC,recip_drF,rC,rF,
389         &  gravitySign,
390         &  rkFac, recip_rkFac, xC0, yC0
391        _RS dxC            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dxC            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
392        _RS dxF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dxF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
393        _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 370  C                 metric term in V equat Line 396  C                 metric term in V equat
396        _RS dyF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dyF            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
397        _RS dyG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dyG            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
398        _RS dyU            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS dyU            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
399        _RS drC            (1:Nr)        _RS R_low          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
400        _RS drF            (1:Nr)        _RS Ro_surf        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
       _RS rkFac  
       _RS recip_rkFac  
       _RS DepthInK       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  
       _RS H              (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  
401        _RS HFacC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS HFacC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
402        _RS HFacW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS HFacW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
403        _RS HFacS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS HFacS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
# Line 387  C                 metric term in V equat Line 409  C                 metric term in V equat
409        _RS recip_dyF      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS recip_dyF      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
410        _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)
411        _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)
412        _RS recip_drC      (1:Nr)        _RS recip_Rcol     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
       _RS recip_drF      (1:Nr)  
       _RS recip_h        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  
413        _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,1:Nr,nSx,nSy)
414        _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,1:Nr,nSx,nSy)
415        _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,1:Nr,nSx,nSy)
       _RS saFac          (1:Nr)  
416        _RS xC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS xC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
417        _RS xC0        _RS xG             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
418        _RS yC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS yC             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
419        _RS yC0        _RS yG             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
420        _RS rA             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS rA             (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
421        _RS rC             (1:Nr)        _RS rAw            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
422        _RS rF             (1:Nr+1)        _RS rAs            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
423          _RS rAz            (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
424          _RS recip_rA       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
425          _RS recip_rAw      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
426          _RS recip_rAs      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
427          _RS recip_rAz      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
428          _RS maskH          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
429          _RS maskC          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
430        _RS maskW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS maskW          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
431        _RS maskS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)        _RS maskS          (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
432        _RS tanPhiAtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS tanPhiAtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
433        _RS tanPhiAtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS tanPhiAtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
434          _RL cosfacU(1-Oly:sNy+Oly,nSx,nSy)
435          _RL cosfacV(1-Oly:sNy+Oly,nSx,nSy)
436          _RL sqcosfacU(1-Oly:sNy+Oly,nSx,nSy)
437          _RL sqcosfacV(1-Oly:sNy+Oly,nSx,nSy)
438          _RS drC            (1:Nr)
439          _RS drF            (1:Nr)
440          _RS recip_drC      (1:Nr)
441          _RS recip_drF      (1:Nr)
442          _RS saFac          (1:Nr)
443          _RS rC             (1:Nr)
444          _RS rF             (1:Nr+1)
445          _RL gravitySign
446          _RS rkFac
447          _RS recip_rkFac
448          _RS xC0
449          _RS yC0
450    
451    #ifdef ALLOW_NONHYDROSTATIC
452          COMMON /GRID_NH/
453         &  recip_hFacU
454          _RS recip_hFacU    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:Nr,nSx,nSy)
455    #endif

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.22