Previous Section Headers
3.3.2.1 Model Buffers
The main model buffers
contain longitude-level slices of a number of fields stored contiguously.
In an out-of-core configuration, these arrays are cycled through an I/O
device, latitude band by latitude band. A schematic representation of this
buffer is presented below.
Figure 3.2.Layout of main model buffers, b1
and b2.
Listed within each buffer is the variable holding the storage location
of its associated field. To the right of each variable is a description
of the field including whether the field is single-level(s) or multi-level
(m). Also shown are related parameters pflenb, pflena, pbflnb, pbflna,
and plenalcl.
Buffer b1(pflenb)
Buffer b2(pflena)
variable
variable
p
b
f
l
n
a
|
Nzt1
|
vorticity: half time-filtered (m)
|
p
l
e
n
a
l
c
l
|
p
b
f
l
n
a
|
Npsp1
|
sfc. pressure, time n(s)
|
Ndt1
|
divergence: half time-filtered (m)
|
Nzp1
|
vorticity, time n (m)
|
Nphis
|
surface geopotential (s)
|
Ndp1
|
divergence, time n (m)
|
Nqminus (PCNST)
|
q being advected in slt
code (m) |
Ndpthp1
|
horiz. temp. diffusion (m)
|
Npsm2
|
surface pressure, time n-2 (s)
|
Ndpslp1
|
long. deriv. of lpns, time n (s)
|
Num2 |
u-wind, time n-2 (m)
|
Ndpsmp1
|
lat. deriv. of lpns, time n (m)
|
Nvm2
|
v-wind, time n-2 (m)
|
|
Nduhp1
|
horiz. u-momentum diff . (m)
|
ntm2
|
temperature, time n-2 (m)
|
Hdvhp1
|
horiz. v-momentum diff. (m)
|
nqm2 (PCNST)
|
constituents, H2O first (m)
|
ndpsp1
|
pressure gradient (s)
|
npb1ht
|
PBL height (s)
|
|
nqpert (PCNST)
|
PBL moisture/constit. Perturb. (s)
|
ntpert
|
PBL temperature perturb.
(s) |
nfsns
|
surface absorbed solar flux (s)
|
nqrs
|
shortwave rad. heating rate (m)
|
nqrl
|
Longwave rad. heating rate (m)
|
p
b
f
l
n
a
|
npsm1
|
surface pressure, time n-1 (s)
|
nzm1
|
vorticity, time n-1 (m)
|
ndm1
|
divergence, time n-1 (m)
|
not used
|
(m)
|
not used
|
(s)
|
not used
|
(s)
|
These buffers hold only those fields which must be carried across
discrete time levels, that are needed in more than one Gaussian latitude
scan, or that need to be contiguous to other fields. One example of a field
which must be carried from one time level to the next is the shortwave
radiative heating rate (qrs), which must be passed forward in
time between calls to the radiation routines.
Surface pressure, vorticity, and divergence are in the buffer
for contiguity purposes. Contiguity is required for optimal vectorization
of the FFT package. This is important since the FFT routines
used in CCM3.6 vectorize over the number of transforms being done. By putting
surface pressure next to vorticity and divergence, an 18-level model produces
a respectable vector length of 37 (i.e. 2*18 + 1) in the Fourier
transform of these fields. If surface pressure were transformed separately,
the vector length for this field would be 1, which would significantly
degrade performance. Surface pressure is contained in memory (common /com3d/),
and is copied to and from the model buffer for the sole purpose of avoiding
the FFT performance penalty.
All buffer fields are accessed computationally as individual, appropriately
dimensioned arrays. This approach yields readable code, and actually runs
a bit faster than using direct buffer references throughout. It also enables
usage of the array bounds checker (f90 -Rb on Cray machines).
This functionality is obtained through Cray
Fortran pointer variables, as illustrated
in a section of subroutine spegrd below:
real b2(plenalcl) ! model buffer
pointer (pz,z) ! declaration
of pointer variable
real z(plond,plev) ! part of model buffer
.
.
.
pz = loc(b2(nzp1+1)) ! array z may now be accessed
Array z, which is a part of a larger buffer, can be referenced
as a separate two-dimensional array once the Cray pointer is set. Though
not part of the ANSI Fortran standard, Cray pointers are supported on a
wide variety of platforms.
Search page
Questions on these pages can be sent to...
erik@ucar.edu .
$Name: ccm3_6_6_latest2 $ $Revision: 1.38.2.1 $ $Date: 1999/03/25 21:38:24 $ $Author: erik $