Utilities for generating parallel I/O decompositions for grids used by CABLE.
Parallel I/O decompositions describe the mapping from the local in-memory
layout of an array on the current process to the global layout of a netCDF
variable on disk. For example, a common I/O decomposition in cable is the
mapping of a 1-dimensional array of size mp to a netCDF variable with
dimensions (x, y, patch) where x and y are the spatial coordinates of
the land point corresponding to the patch index, and patch is the relative
patch index on that land point. Please see the documentation of the individual
decomposition generating functions in this module for more details on the
specific mappings they generate.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | INDEX_NOT_FOUND | = | -1 |
Returns the land index corresponding to the given patch index, using
cstart and nap to determine the mapping. If the patch index does not lie on
any land point, the function aborts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) | :: | patch_index |
The patch index to map to a land index. |
Returns a parallel I/O decomposition mapping from a memory layout with a 'land' dimension to a netCDF variable layout with 'x' and 'y' dimensions.
| 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) | :: | 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 variable for which the decomposition is being
created using |
||
| integer, | intent(in), | optional | :: | var_x_index |
The index of the 'x' dimension in |
|
| integer, | intent(in), | optional | :: | var_y_index |
The index of the 'y' dimension in |
|
| integer, | intent(in), | optional | :: | index_map(:) |
An optional mapping from the dimension indexes of |
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.
| 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 variable for which the decomposition is being
created using |
||
| integer, | intent(in), | optional | :: | var_x_index |
The index of the 'x' dimension in |
|
| integer, | intent(in), | optional | :: | var_y_index |
The index of the 'y' dimension in |
|
| integer, | intent(in), | optional | :: | var_patch_index |
The index of the 'patch' dimension in |
|
| integer, | intent(in), | optional | :: | index_map(:) |
An optional mapping from the dimension indexes of |
Returns a parallel I/O decomposition mapping from a memory layout with a local 'land' dimension to a netCDF variable layout with a global 'land' dimension.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | land_decomp_start |
The starting index of the first local 'land' index along the global 'land' dimension. |
||
| 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 variable for which the decomposition is being
created using |
||
| integer, | intent(in), | optional | :: | var_land_index |
The index of the 'land' dimension in |
|
| integer, | intent(in), | optional | :: | index_map(:) |
An optional mapping from the dimension indexes of |
Returns a parallel I/O decomposition mapping from a memory layout with a 'patch' dimension to a netCDF variable layout with a 'land' and 'patch' dimension.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | land_decomp_start |
The starting index of the first local 'land' index along the global 'land' dimension. |
||
| 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 variable for which the decomposition is being
created using |
||
| integer, | intent(in), | optional | :: | var_land_index |
The index of the 'land' dimension in |
|
| integer, | intent(in), | optional | :: | var_patch_index |
The index of the 'patch' dimension in |
|
| integer, | intent(in), | optional | :: | index_map(:) |
An optional mapping from the dimension indexes of |
Returns a parallel I/O decomposition mapping from a memory layout with a local 'patch' dimension to a netCDF variable layout with a global 'patch' dimension.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | patch_decomp_start |
The starting index of the first local 'patch' index along the global 'patch' dimension. |
||
| 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 variable for which the decomposition is being
created using |
||
| integer, | intent(in), | optional | :: | var_patch_index | ||
| integer, | intent(in), | optional | :: | index_map(:) |
An optional mapping from the dimension indexes of |