next up previous contents
Next: 11.3.3 Moving the memory Up: 11.3 The Memory Window Previous: 11.3.1 Detailed anatomy

   
11.3.2 Solving prognostic equations within the MW.

Refer to the example in Figure 11.4a. On disk (or ramdrive), there are jmt=8 latitude rows arranged monotonically from south to north with jrow=1 representing the southernmost row and jrow=jmt the northernmost one. Notice also that the first and last rows are marked with starting and ending indices ``jstask'' and ``jetask''. These define the limits of the processor's task and the processor does not reference data outside of these limits. The other set of indices ``jscomp'' and ``jecomp'' mark the starting and ending rows on which prognostic equations are solved (computed).

A minimum sized MW for 2nd order numerics is shown accessing data from latitude rows on disk (or ramdrive). Note that the global index jrow=4 corresponds to local index j=2 within the MW. The arrows pointing from the disk (or ramdrive) to the MW indicate that $\tau $ and $\tau-1$ data in local MW rows $j=\{1,2,3\}$ are from disk latitude rows $jrow=\{3,4,5\}$. Prognostic equations are solved on latitude row j=2 within the MW. The arrow pointing from the MW to the disk (or ramdrive) indicates that updated data at time level $\tau+1$ is written back to disk over the tau-1 slot. Note that the relation between local index j and global index jrow is given by the offset joffin the figure. In general, for any local index j, the mapping to global index jrow is


 
jrow = j + joff (11.4)

where offset joff is simply how far the memory window has been moved northward from the latitude given by ``jstask''.

In general, prognostic equations are solved on all jrows from ``jscomp'' to ``jecomp'' by a northward moving MW which solves a small group of rows (usually one) at a time. All steps are illustrated in Figure 11.4b. The first MW loads data from $jrow=\{1,2,3\}$and the offset is joff=0. Prognostic equations are solved for local index j=2 within the MW and written back to the jrow=2 slot on the $\tau-1$ disk (or ramdrive). Then the MW is moved northward by the following operation. All data within the MW on row j=2 is copied to row j=1 followed by all data on row j=3 being copied into row j=2. This is explained more fully below. Then two time levels of disk data from global latitude row with index jrow=4 are read from disk (or ramdrive) into MW row j=3 and the offset is bumped up by the number of computed rows which in this case is one. Therefore, joff=1for the second MW. After prognostic equations are solved for row j=2, the updated data is written back to the jrow=3 slot on the $\tau-1$disk (or ramdrive). The process continues until all rows from jscomp=2 to jecomp=jmt-1 have been updated to $\tau+1$ values on the $\tau-1$ disk (or ramdrive).

Figure 11.5 is the counterpart to Figure 11.4 for a fourth order window. Since, third and fourth order numerical schemes require two additional rows in the MW, the minimum size of the MW is jmw=5. Using five rows, the essential point is to calculate second order quantities on the three central rows $j=\{2,3,4\}$. Meridional differences of these second order quantities yield a fourth order result defined at the central row11.8 j=3. All schemes which use nearest neighbors of nearest neighbor cells require option fourth_order_memory_window which is automatically enabled in file size.h when any of the existing fourth order schemes are enabled. Any new parameterization which requires the above 4th order differencing must also enable option fourth_order_memory_window. In contrast to the 2nd order MW, joff=-1 for the first MW and prognostic equations are solved for the central row which is j=3. Note also, that the j=1 row in the first MW hangs below the physical domain which starts at jrow=1. Data from row j=2 is replicated in row j=1 to fill this first MW. As can be seen in Figure 11.5b, prognostic equations are still solved from rows jscomp=2 to jecomp = jmt - 1 as in the 2nd order MW case.


next up previous contents
Next: 11.3.3 Moving the memory Up: 11.3 The Memory Window Previous: 11.3.1 Detailed anatomy
RC Pacanowski and SM Griffies, GFDL, Jan 2000