next up previous contents
Next: 17.2 Rotating Scalars and Up: 17. Grid Rotation Previous: 17. Grid Rotation

   
17.1 Defining the rotation

Any spherical grid rotation can be specified by defining three solid body rotations. The angles which define the rotations are usually referred to as Euler angles (see ``Classical Mechanics'' by Goldstein, 1950 or a similar text). First, define the Z axis to be through the poles such that the X-Y plane defines the equator and the X axis runs through the prime meridian. In the routines (in rotation.F), the rotation angles are called phir,  thetar and  psir. The angle phir is defined as a rotation about the original Z axis. Angle thetar is defined as a rotation about the new X axis (after the first rotation) and angle phir is defined as a rotation about the final Z axis (see Figure 17.1).

It is helpful to have a globe to look at when thinking about this. Imagine that the globe has a clear sphere surrounding it, with only grid lines of latitude and longitude. By moving the outer sphere, the grid poles can be moved to line up with different points on the globe. Once the new poles are located, two of the rotation angles can be defined as follows. The definition for phir is 90 degrees minus the geographic longitude of the new north pole. This rotates the Y axis under the new pole. To move the Z axis down, thetar is defined to be 90 degrees minus the geographic latitude of the new north pole. This places the original Z axis though the new north pole position.

To completely define the grid, a third rotation about the new Z axis, must be specified. The rotated grid longitude of any point on the geographic grid is still undefined. To specify this last rotation, choose a point on the geographic grid (the globe) to locate the rotated grid's prime meridian. Set angle psir to zero and calculate the longitude of this point on the rotated grid. This longitude is the final angle psir, the angle needed to rotate the point back to the prime meridian. The definition of psir is usually not very important since the new grid longitude is arbitrary, but it does make a difference in defining exactly where the new grid starts. This may be important if it is desirable to line up grids for nesting. Looking at Figure 17.1, it may appear that all of the angle definitions are of the opposite sign to what they should be, but this comes from thinking about rotating the axes rather than rotating the rigid body.

Generally, the idea is to move the poles so that they are 90 degrees away from the area of interest. For example, to set up a model with an equatorial grid over the Arctic and North Atlantic, the rotated grid north pole could be positioned at 0 N, 110 W and a prime meridian point at 0 N, O E. This defines a grid rotation in which the new grid equator is along the 20 W and 160 E meridians. The rotated grid longitude is east, north of the geographic equator and west to the south. On the rotated grid, North America is in the north and Europe in the south, and the geographic north pole is at 0 N, 90 E. It is more difficult if you want to specify an arbitrary grid rotation, but usually a few trials is enough to locate the necessary pole position.

Having defined the angles of rotation, an orthogonal transformation matrix can be written. The first rotation through an angle $\Phi$about the z axis (counterclockwise looking down the -z direction) is given by


\begin{displaymath}D = \left( \begin{array}{ccc}
\cos\Phi & \sin\Phi & 0 \\
-\sin\Phi &\cos\Phi & 0 \\
0 & 0 & 1
\end{array} \right) \end{displaymath}

The second rotation through an angle $\Theta$ about the new x axis (counterclockwise looking down the -x direction) is given by


\begin{displaymath}C = \left( \begin{array}{ccc}
1 & 0 & 0 \\
0 & \cos\Theta ...
...n\Theta \\
0 & -\sin\Theta & \cos\Theta
\end{array} \right) \end{displaymath}

and the final rotation through an angle $\Psi$ about the z axis (counterclockwise looking down the -z direction) is given by


\begin{displaymath}B = \left( \begin{array}{ccc}
\cos\Psi & \sin\Psi & 0 \\
-\sin\Psi & \cos\Psi & 0 \\
0 & 0 & 1
\end{array} \right) \end{displaymath}

Note that the total rotation A can be written as the product of the three rotations A = BCD (ordering is important here).



\begin{displaymath}A = \left( \begin{array}{ccc}
\cos\Psi \cos\Phi -\cos\Theta ...
...n\Phi & -\sin\Theta \cos\Phi & \cos\Theta
\end{array} \right) \end{displaymath}


Transforming points from the unrotated system to the rotated system (marked by primes) is given as


 \begin{displaymath}\left( \begin{array}{c} x' \\ y' \\ z' \end{array} \right)
= A \left( \begin{array}{c} x \\ y \\ z \end{array} \right)
\end{displaymath} (17.1)

and transforming points from the rotated system (marked by primes) to the unrotated system is given as


\begin{displaymath}\left( \begin{array}{c} x \\ y \\ z \end{array} \right)
= A^{-1} \left( \begin{array}{c} x' \\ y' \\ z' \end{array} \right)
\end{displaymath} (17.2)

where the inverse transform A-1 is



\begin{displaymath}A^{-1} = \left( \begin{array}{ccc}
\cos\Psi \cos\Phi -\cos\T...
...in\Psi & \sin\Theta \cos\Psi & \cos\Theta
\end{array} \right) \end{displaymath}


Note that the inverse transform A-1 is really just A with $\Psi$and $\Phi$ switched and all rotation angles made negative. In MOM, Equation (17.1) is used in routine ``rotate'' to produce coordinates with respect to the rotated frame.


next up previous contents
Next: 17.2 Rotating Scalars and Up: 17. Grid Rotation Previous: 17. Grid Rotation
RC Pacanowski and SM Griffies, GFDL, Jan 2000