Next: 11.3.1 Detailed anatomy
Up: 11. Uni-tasking
Previous: 11.2.1 Slicing through the
11.3 The Memory Window
The memory window (MW) provides the framework for solving all tracer
and baroclinic equations in a uni-tasking as well as a
multi-tasking environment. It is not used for the barotropic equation
since the total storage for 2D arrays is small compared to 3D arrays.
In precursors to MOM, an array of data along longitude and depth was
indexed as A(i,k). Within the MW, the same array would be indexed as
A(i,k,j) where the ``j'' index is a latitude index local to the MW.
This generalized approach is capable of simulating the older method but
allows for much greater flexibility. Some of the advantages of the MW
are:
- Higher order finite difference schemes and parameterizations
which require access to more than three latitude rows can be
implemented in a straight forward manner.
- There is a reduction in the number of names required for
variables. For example, in MOM 1 and previous incarnations, tracers
required three names: one for the row being computed, one for the row
to the north and another for the row to the south. However, there is
only need for one name: the row being computed is accessed by local
index j and rows to the north and south are accessed by local row
indices j-1 and j+1.
- Essentially all prognostic variables are subscripted by three
spatial indices (i,k,j) as if infinite central memory were available.
However, the actual memory needed is controlled by the size of the
memory window jmw. Equations and coding looks the same, regardless
of how large or small the memory window is. In fact, the memory window
can be opened all the way so that all dataflow between disk and memory
vanishes. However, this is wasteful of memory when the number of
latitude rows per processor is large since the memory window requires
three time levels and only two time levels are needed on disk (or
ramdrive).
- Increases in speed can be realized when opening up the memory
window on a single processor. This is the case when lots of diagnostic
options are enabled. The reason is that less redundant computations are
required when the memory window is opened up.
- All 3D parameterizations are easily parallelizable with a minimum
of communication calls.
The only disadvantage of opening the MW up beyond the minimim size is
that memory will be aggressively consumed.
Next: 11.3.1 Detailed anatomy
Up: 11. Uni-tasking
Previous: 11.2.1 Slicing through the
RC Pacanowski and SM Griffies, GFDL, Jan 2000