public function io_decomp_patch_to_x_y_patch(land_x, land_y, cstart, nap, mem_shape, var_shape, type, var_x_index, var_y_index, var_patch_index, index_map) result(decomp)
Returns a parallel I/O decomposition mapping from a memory layout with
a 'patch' dimension to a netCDF variable layout with 'x', 'y', and 'patch'
dimensions.
Note that the 'patch' dimension in the memory layout represents the index in
the 1-dimensional vector of patches, and in the netCDF variable layout, the
'patch' dimension represents the index of the patch on a particular land
point.
The 'patch' dimension is assumed to be the first (i.e. fastest varying)
index in mem_shape.
Arguments
Type
Intent
Optional
Attributes
Name
integer,
intent(in)
::
land_x(:)
An array mapping land indexes to x (longitude) indexes.
integer,
intent(in)
::
land_y(:)
An array mapping land indexes to y (latitude) indexes.
integer,
intent(in)
::
cstart(:)
The starting patch index for each land point.
integer,
intent(in)
::
nap(:)
The number of active patches for each land point.
integer,
intent(in)
::
mem_shape(:)
The shape of the in-memory array.
integer,
intent(in)
::
var_shape(:)
The shape of the netCDF variable.
integer,
intent(in)
::
type
The data type of the in-memory array for which the decomposition is being
created using CABLE_NETCDF_TYPE_* constants from cable_netcdf_mod.
integer,
intent(in),
optional
::
var_x_index
The index of the 'x' dimension in var_shape. Defaults to 1 if not provided.
integer,
intent(in),
optional
::
var_y_index
The index of the 'y' dimension in var_shape. Defaults to 2 if not provided.
integer,
intent(in),
optional
::
var_patch_index
The index of the 'patch' dimension in var_shape. Defaults to 3 if not provided.
integer,
intent(in),
optional
::
index_map(:)
An optional mapping from the dimension indexes of var_shape to the
dimension indexes of mem_shape. If not provided, it is assumed that the
dimensions of var_shape map to the dimensions of mem_shape in order,
with var_x_index, var_y_index and var_patch_index being mapped to
the first index of mem_shape.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.