next up previous contents
Next: 21.2.1 Rules for manipulating Up: 21. The Discrete Equations Previous: 21.1.2 Derivative operators

   
21.2 Key to understanding finite difference equations

The grid distances (measured in cm) are determined by the distance between variables as indicated in Figures 16.2, 16.3, and 16.4. Before looking at any finite difference equations, the reader should be convinced of the following relations:

These operations reflect the nature of the staggered B grid. Once convinced of the above, the second thing to be aware of is that it's not sufficient to only know what a quantity is; where the quantity is defined is just as important. The where information is usually built into the name of the variable by the naming convention described in Chapter 14. There are a small number of interesting places on the grid. The grid point within a grid cell is one; the east, north, and bottom face of a cell are others. A quantity indexed by (i,k,j) may be defined at the grid point in celli,k,jor on the east, north, or bottom face of celli,k,j. Note that if a variable $\alpha_{i,k,j}$ is defined on the east face of celli,k,j, its value on the west face of the cell is $\alpha_{i-1,k,j}$. Similarly, if defined on the north face of celli,k,j, then its value on the south face of the cell is $\alpha_{i,k,j-1}$. Likewise, if defined on the bottom face of celli,k,j, then its value on the top face of the cell is $\alpha_{i,k-1,j}$.

Note that this convention is a departure from the indexing used in Bryan (1969) where the faces of cells were referenced by half indexes (i.e., $i+\frac{1}{2}$). Half indexes do not map well into Fortran and are not used in this manual. The idea is that by looking at this manual it should be possible to determine if the code is wrong (or vice versa).



 
next up previous contents
Next: 21.2.1 Rules for manipulating Up: 21. The Discrete Equations Previous: 21.1.2 Derivative operators
RC Pacanowski and SM Griffies, GFDL, Jan 2000