next up previous contents
Next: 22.2.4.1 Example 1: density Up: 22.2 loadmw (load the Previous: 22.2.3 Constructing the total

   
22.2.4 Computing quantities within the memory window

The memory window (MW) is fundamental to solving 3-D baroclinic and tracer equations within MOM. It is not used for solving the 2-D barotropic equation. For a description of the MW, refer to Section 11.3. Figure 22.2 illustrates the horizontal grid within a minimum sized MW and shows sites where prognostic quantities are defined as well as sites populated by derived quantities. Recall that equations for prognostic quantities are solved only on row j=2 within this minimum sized MW. Prognostic quantities on rows j=1 and j=3 are used only to supply access to neighboring cells required by the numerics for solving prognostic equations on row j=2.

Prognostic quantities within grid cells such as temperature, salinity, and horizontal velocity components are defined at grid points within T-cells and U-cells on rows $j=\{1,2,3\}$ and therefore dimensioned by the size of the MW as in the following array:


      dimension A(imt,km,jmw)    ! all cells within the memory window


Advective velocity on the north face of T-cells `` $adv\_vnt(i,k,j)$'' is a derived quantity. It is defined for T-cells on rows $j=\{1,2,3\}$and computed as a zonal average of meridional velocity components which are defined on U-cell grid points for rows $j=\{1,2,3\}$. Since all components for the computation exist within the MW, `` $adv\_vnt(i,k,j)$'', must also be dimensioned as above.

Note that some derived quantities cannot occupy certain sites and these are indicated by a circle with at line across it. For instance, neither the advective velocity on the east face of T-cells for j=1 nor the advective velocity on the south face of U-cells for j=1 can be defined because their computation references quantities outside the MW. As a more detailed example, consider derived quantities such as the advective flux through the northern face of a T-cell `` $adv\_fn(i,k,j)$'' which involve the product of an advective velocity on the northern T-cell face `` $adv\_vnt(i,k,j)$'' and the average temperature on that cell face. Since the average temperature on the northern face of cell ``j'' is


\begin{displaymath}\overline{T_{i,k,j}}^\phi = (T_{i,k,j} + T_{i,k,j+1})/2
\end{displaymath} (22.10)

the advective flux can only be dimensioned as $adv\_fn(imt,km,jmw-1)$ otherwise the flux at index j=jmw would require knowledge of temperature at j=jmw+1 which is unknown because it is outside of the MW. Apart from quantities like density and advective velocity, other quantities such as Richardson number, mixing coefficients, etc. may be required by enabled options. In general, placement of derived quantities within the grid system is determined soley by numerics within finite difference equations.

The rule is simple. Any latitude row for which a quantitiy can be calculated should be populated by the calculation. Furthermore, the number of rows that can be populated within the memory window determines the dimension of the quantity. As the memory window is moved northward, all prognostic as well as derived quantities are copied from the northernmost rows into the southernmost rows (as described further in Section 11.3.3) so that no redundant computations are required. All arrays dimensioned within the memory window must have their latitude dimension fall into one of the following four catagories:


      dimension A(,,jmw)         ! all cells within the memory window
      dimension B(,,1:jmw-1)     ! all cells except j=jmw
      dimension C(,,2:jmw)       ! all cells except j=1
      dimension D(,,2:jmw-1)     ! all cells except j=1 and j=jmw


A few more examples follow:



 
next up previous contents
Next: 22.2.4.1 Example 1: density Up: 22.2 loadmw (load the Previous: 22.2.3 Constructing the total
RC Pacanowski and SM Griffies, GFDL, Jan 2000