next up previous
Next: prism_reducedgrid_map Up: Grids and related quantities Previous: prism_set_mask


prism_def_partition

prism_def_partition (grid_id, nbr_blocks, offset_array, extent_array, ierror)


Table 5.13: prism_def_partition arguments
\begin{table}\begin{tabularx}{16cm}[t]{\vert l\vert l\vert l\vert X\vert}
\hlin...
...\texttt{Integer}&
returned error code\\
\hline
\end{tabularx}\end{table}




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).

Gaussian reduced grids .

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.


next up previous
Next: prism_reducedgrid_map Up: Grids and related quantities Previous: prism_set_mask
Laure Coquart 2011-12-01