prism_def_grid(grid_id, grid_name, comp_id, valid_shape, grid_type,ierror)
This routine declares a grid and describes its structure.
The argument grid_name must match the attribute `local_name' of the corresponding element `grid' in the SMIOC XML file and must be unique within the component.
The array valid_shape is dimensioned (2,ndim)
and gives, for each of the ndim dimensions of the grid (see table
5.8), the minimum and maximum local index values
corresponding to the ``valid'' part of the corner
(see 5.3.2), point (see 5.3.6,
mask (see 5.3.3) and
field (see 5.4.1) arrays treated by the
process, without the halo region (i.e.
on figure 5.7). For example,
if the actual extent of the
first dimension is from 1 to 100, it may be that the ``valid'' part of the array
goes from 2 to 98 (i.e. valid_shape(1,1)=2 and
valid_shape(2,1)=98 . Note that the ``valid'' part of
the grid must be uniquely defined and cannot overlap to itself.
|
The argument grid_type describes the grid type and implicitly specifies the shape of the corner, point, mask and field arrays passed to the PSMILe. Grids that are currently supported cover:
Other characteristics of the grid will be described by other routines and the link will be made by the grid identifier grid_id.
Gaussian reduced grids. For
Gaussian reduced grids, all processes defining the grid have to call
prism_def_grid with
grid_type=PRISM_gaussreduced_regvrt. Two numerical
dimensions (ndim=2) are used to describe the 3D domain: the
first dimension covers the horizontal plane and the second dimension
covers the vertical. Furthermore, all these processes have to provide
a description of the global reduced gaussian grid by a call to
prism_reducedgrid_map (see 5.3.5), and have
to describe the local partition of the grid with a call to
prism_def_partition (see
5.3.4).
Non-geographical grids. For fields located on a non-geographical grid, prism_def_grid still has to be called with grid_type = PRISM_gridless. For coding reasons, ndim must be always equal to 3 and the call to prism_def_grid must be done with valid_shape(1:2, 2:3) = 1. The partitioning of non-geographical grids must also be described by a call to prism_def_partition (see 5.3.4); furthermore, a call to prism_set_points_gridless (see 5.3.7) is also required.