5.2.13 2-D Workspace variables
7.1 Domain and Resolution
The model domain, which may be global, is dened as a thin shelled volume bounded by six coordinates: two latitudes, two longitudes, and two depths on the surface of a spherical earth.
Embedded within this domain is a \rectangular" grid system aligned such that the principle directions are along longitude
(measured in degrees east of Greenwich), latitude(measured in degrees north of the equator), and depthzt
(measured in centimeters from the surface of the spherical shell to the ocean bottom). Note that the vertical coordinatez
increases upwards.7.1.1 Regions
The domain may be further sub-divided into regions% each of which is similarly bounded by six coordinates: two latitudes, two longitudes, and two depths. Within each region, resolution can be specied as constant or non-uniform along each of the coordinate directions. Although non-uniform resolution is permitted, it is not allowed in the sense of generalized curvilinear coordinates. Resolution along any coordinate is constrained to be a function of position along that coordinate. For instance, vertical thickness of grid cells may vary with depth but not with longitude or latitude.
7.1.2 Resolution
The resolution within a region is determined by the width of the region and resolution at the bounding coordinates. Along any coordinate, if resolution at the bounding coordinates is the same, then resolution is constant across the region, otherwise it varies continuously from one boundary to the other according to an analytic function (Treguier, Dukowicz, and Bryan 1995).
The function describing the variation is prescribed to be a cosine. Although arbitrary, this function has two important properties: it allows the average resolution within any region to be calculated as an average of the two bounding resolutions% and it insures that the rst derivative of the resolution vanishes at the region's boundaries. A vanishing rst derivative allows regions to be smoothly joined. The only restriction is that there is an integral number of grid cells within a region.
75
N
= j;j()+ ) )
=
2 (7:
1)where
N
must be an integer and the resolution for any cell )m is given by )m = )+ )2 ;) ;)
2 cos(
m
;0:
5N
) (7:
2)where
m
= 1N:
As an example, if and were longitudes, the western edge of the rst cell would be a and the eastern edge of cellN
would be at.7.1.3 Describing a domain and resolution
A grid domain and resolution is built by specifying bounding coordinates and resolution at those coordinates for each region.
Example 1
Imagine a grid with a longitudinal resolution ) = 1 encircling the earth and a meridional resolution ) = 1
=
3 equatorward of 10 N and 10 S, and a vertical grid spacing )z =10 meters between the surface and a depth of 100 meters. This domain and resolution is specied in the following manner. Two bounding longitudes: one at 0 E and the other as 360 E with )= 1 at both longitudes% two bounding latitudes: one at;10 and the other at +10 with )= 1=
3 at both latitudes% and two bounding depths: one at 0cm and the other at 100x102cm with )z =10x102cm at both depths. These specications imply 360 grid cells in longitude, 60 grid cells in latitude, and 10 grid cells in depth1Example 2
In the preceeding example, if it were desired to extend the latitudinal domain poleward of 10 N and 10 S to 30 N and 30 S where the meridional resolution was to be )= 1 , then the two previous bounding latitudes would need to be replaced by four: one at ;30 where ) = 1 , one at;10 where )= 1
=
3 , one at +10 where )= 1=
3 and one at +30 where )= 1 . Poleward of 10 degrees, meridional resolution would telescope from )= 1=
3 to )= 1 over a span of 20 . The average meridional resolution in this region is calculated as the average of the bounding resolutions which is 1 +12=3 = 2=
3 . Therefore, there would be 220=3 =30 additional grid cells in each hemisphere between latitudes 10 and 30 .Example 3
Suppose it was desired to construct a square grid between latitude 60 S and 60 N with 1 resolution at the equator. The bounding longitudes would be set as in Example 1. To keep the grid cells square, the latitudinal resolution at 60 would be )= 1 cos60 = 0
:
5 . Therefore, two latitudinal regions are required: The rst is specied as being bounded by latitude 60 S where ) = 0:
5 and latitude 0 S where ) = 1:
0 % the second is bounded by latitude 0 S where ) = 1:
0 and latitude 60 N where ) = 0:
5 . Each region has a width of 60 andN
= (1+060:5 )=2 =80 grid cells.1Actually, two extra boundary cells are added to the grid domain in the latitude and longitude dimensions, but not in the vertical (historical reasons). Calculations range from i= 2 toimt;1 in longitude, jrow= 2 to jmt;1 in latitude, andk= 1 tokmin depth where domain size is (imtxjmtxkm) cells.
and 7.3 which depict grid cells within horizontal and vertical surfaces. Within each T cell is a T grid point which denes the location of tracer quantities. Similarly, each U cell contains a U grid point which denes the location of the zonal and meridional velocity components.
7.2.1 Relation between T and U cells
Within a horizontal surface at depth level
k
, grid points and cells are arranged such that a grid pointU
ikjrow (where subscript i is the longitude index, jrow is the latitude index, and k is the depth index) is located at the northeast vertex of cellT
ikjrow. Conversely, the grid pointT
ikjrow is located at the southwest vertex of cellU
ikjrow. Ti=1kjrow=1 is the southwestern most T cell and Ti=imtkjrow=jmtis the northeastern most T cell within the grid.This horizontally staggered grid system is replicated and distributed vertically between the ocean surface and bottom of the domain. Tik=1jrow is the rst cell below the surface and Tik=kmjrow is the deepest cell. Unlike in the horizontal, T cells and U cells are not staggered vertically so all T cells and U cells with index
k
are at the same depth.7.2.2 Regional and domain boundaries
As mentioned in Section 7.1, when specifying bounding coordinates and resolution, there must be an integral number of cells contained between these coordinates in each of the coordinate directions. The integral number of cells refers specically to T cells. In the horizontal plane, bounding surfaces of constant longitude and latitude dene the location of U grid points and resolution at those surfaces is given to the corresponding U cells. Resolution varies continuously between bounding surfaces and is discretized, using Equations (7.1) and (7.2), to cell widths and heights. In the vertical plane, bounding surfaces are at the top or bottom of cells and resolution is discretized to cell thicknesses as in the horizontal plane. It should be noted that in the vertical, allowance is made for a stretching factor in the last region to provide for a more drastic fall o of resolution to the bottom if desired.
7.2.3 Non-uniform resolution
Within a region of constant resolution, all T and U grid points are located at the centers of their respective cells. When resolution is non-uniform, this is not the case. Within MOM 2, there are two methods to discretize non-uniform resolution onto T cells and U cells. Based on Equations (7.1) and (7.2) in section 7.1, and the averaging operator given by
(
)m= ()m+ ()m+12
(7:
3)the two methods are
1. )Tm= U+2 U ;U;2 U cos(
m;0N:5)% )Um= )Tmm 2. )Um= U+2 U ;U;2 U cos(mN)% )Tm= )Ummwhere )U and )U are resolution of U cells at the bounding surfaces
and,N
is the number of cells given by Equation (7.1) in section 7.1, and the subscriptm
refers to longitude indexi
or latitude indexj
. These methods can also be applied to cells in the vertical, even thoughby W in the expressions for both methods given above.
The motivation for method 2 is rst to notice that on a non-uniform grid, advective velocities are a weighted average of velocities but the denominator is not the sum of the weights as indicated in Section 11.5. This form of the advective velocities is implied by energy conservation arguments as given in Section 12.3. Secondly, the average of the quantity being advected is not dened coincident with the advecting velocity. Redening the average operator in Equation (7.3) results in second moments not being conserved as indicated in Chapter 12. Method 2 remedies both problems by simply redening the location of grid points within grid cells. All equations remain the same.
In method 1, U cell size is the average of adjacent T cell sizes. This means that T points are always centered within T cells, but U points are o center when the grid is non-uniform. This was the method used in model versions prior to MOM 2. In method 2, the construction is the other way around: T cell size is the average of adjacent U cell sizes. Accordingly, U points are always centered within U cells but T points are o center when the resolution is non-uniform.
It should be noted that MOM 2 allows both methods. Although the default grid construction is by method 2, enabling option centered t2 when compiling will result in grid construction by method 1.
Accuracy of numerics
When resolution is constant, the nite dierence numerics are second order accurate. In this case, grid cells and grid points are at the same locations regardless of whether they are constructed using method 1 or method 2. However, contrary to widespread belief, when reso-lution is non-uniform, numerics are still second order accurate if the stretching is based on a smooth analytic function. See Treguier, Dukowicz, and Bryan (1995).
Even though methods 1 and 2 are second order accurate, is one slightly better than the other? In particular, does the horizontal staggering of grid cells implied by method 2 give slightly better horizontal advection3 of tracers while the staggering implied by method 1 give more accurate horizontal advection of momentum? Also, since T cells and U cells are not staggered in the vertical, does method 2 gives more accurate vertical advection of tracers and momentum than method 1?
The reasoning behind these questions can be seen by referring to Figure 7.4 and noting the placement of T grid points within T cells4. Advective uxes are constructed as the product of advective velocities and averages of quantities to be advected.