prism_def_partition (grid_id, nbr_blocks,
offset_array, extent_array, ierror)
The local partition treated by the process must also be described with a call to prism_def_partition in terms of indices in a global index space sweeping all ``valid'' parts of local domains, therefore based on the valid_shape defined in the routine prism_def_grid, .
The global index space is a unique and common indexing for all grid points of the component. For example, if a component covers a global domain of 200 grid points that is distributed over two processes covering 100 points each, the first and second partition local indices can both be (1:100); however, their global indices will be respectively (1:100) and (101:200).
A partition may also cover different sets of points
disconnected in the global index space; each one of those sets of
point constitutes one block and has to be described by its offset
and extent in the global index space. Let's suppose, for example,
that the 200 points in the first i direction of a component are
distributed over two processes such that points with i= 1 to 50 and i
= 76 to 100 are treated by the first process and such that points with
i = 51 to 75 and i = 101 to 200 are treated by the second process. In
this case, the number of blocks for each process is 2, and the
first process blocks can be described with global offsets of 0 and
75 (offset_array(1,1)=0, offset_array(2,1)=75) and
extents of 50 and 25 (extent_array(1,1)=50,
extent_array(2,1)=25), while the second process blocks
can be described by global offsets of 50 and 100
(offset_array(1,1)=50, offset_array(2,1)=100) and
extent of 25 and 100 (extent_array(1,1)=25,
extent_array(2,1)=100). An example of offset_array and
extent_array is available in the tutorial toy model is
oasis4/examples/tutorial1 (see the readme_tutorial1.pdf therein).
For Gaussian reduced grids, prism_def_partition must be called by each process to describe its local partition. The horizontal partitioning, described by offset_array(:,1) and extent_array(:,1), must describe each latitudinal band of the reduced grid local partition as a block on its own. The offset_array(:,1) refer to the offset of each block in a horizontal global index space defined as the sequence of points starting at the most northern (or southern) latitude band and is going down in circular manner to the most southern (or northern) latitude band.
In this OASIS4 version, the horizontal partitioning, if any, must be the same for all vertical levels; therefore, offset_array(:,2) must always be equal 0 and extent_array(:,2) must always be equal to the number of vertical levels.
Note that in addition all processes have to call prism_reducedgrid_map for a description of the global reduced Gaussian grid (see 5.3.5).
Non-geographical grids (`gridless' grids).
Coupling exchanges (but not I/O in the current version) of fields not located on a geographical grid are supported, based on the description of the process local partition in terms of indices in the global index space. For these `gridless' grids, as ndim=3 but only the first dimension is meaningful, extent_array(:,2:3) = 1 offset_array(:,2:3) = 0.
2D partitions supported
Different types of 2D partitions with one or more than one block per partition are supported for the different grids.
For these type of grids, rectangular partitions with one or more
blocks per partition, as illustrated in Figure 5.3 are supported.
Some more complex partitions are also supported for these grids if one
declares them as
PRISM_gaussreduced_regvrt grids (see
Figure 5.6).
For these grids, partitions with complete or partial latitudinal bands
are supported. As explained above, each latitudinal band must be
expressed as a separate block. Figure 5.4 illustrate cases
where the latitudinal bands are consecutive, where as figure
5.5 illustrate a case where the latitudinal bands are not
consecutive. Coupling and I/O are supported when the latitudinal bands
are consecutive but I/O are not supported -in the current OASIS4
version- when the latitudinal bands are not
consecutive.
|
|
|
|
The search algorithms developped for
PRISM_gaussreduced_regvrt allows to support more general
partitions, even for PRISM_reglonlatvrt if they are declared as
PRISM_gaussreduced_regvrt. Figure 5.6
illustrates the case of partitions with partial latitudinal bands
and with non-consecutive blocks. These cases should work but have not been thoroughly
tested though. As above, I/O are not supported -in the OASIS4
current version- when the latitudinal bands are not consecutive
(i.e. case G on Figure 5.6).
|
|