Utilities for generating parallel I/O decompositions for grids used by CABLE.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | SUBSCRIPT_NOT_FOUND | = | -1 |
A derived type which associates a name with a dimension.
The name component can be used to identify a dimension which is used for
mapping a dimension in the in-memory array to one or more dimensions in the
netCDF variable data. For example, the patch dimension which ranges from 1
to mp can be mapped to a (land, patch) coordinate which ranges from (1,
1) to (mland_global, max_veg_patches).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=64), | public | :: | name |
The name of the dimension. |
|||
| integer, | public | :: | size |
The size of the dimension. |
Returns the subscript of the dimension matching name in the
shape_spec array. If no such dimension exists, the function aborts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dim_spec_t), | intent(in) | :: | shape_spec(:) |
The shape_spec array to search for the name. |
||
| character(len=*), | intent(in) | :: | name |
The name of the dimension to find the subscript of. |
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,
using the provided land_x and land_y arrays to determine the mapping
from land indexes to x and y indexes.
| 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. |
||
| type(dim_spec_t), | intent(in) | :: | mem_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
in-memory array. |
||
| type(dim_spec_t), | intent(in) | :: | var_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
netCDF variable. |
||
| integer, | intent(in) | :: | type |
The data type of the variable for which the decomposition is being
created using |
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, using the provided land_x and land_y arrays to determine the
mapping from land indexes to x and y indexes, and using cstart and nap
to determine the mapping from patch indexes to (land, patch) coordinates.
| 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. |
||
| type(dim_spec_t), | intent(in) | :: | mem_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
in-memory array. |
||
| type(dim_spec_t), | intent(in) | :: | var_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
netCDF variable. |
||
| integer, | intent(in) | :: | type |
The data type of the variable for which the decomposition is being
created using |
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 global 'land' dimension. |
||
| type(dim_spec_t), | intent(in) | :: | mem_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
in-memory array. |
||
| type(dim_spec_t), | intent(in) | :: | var_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
netCDF variable. |
||
| integer, | intent(in) | :: | type |
The data type of the variable for which the decomposition is being
created using |
Returns a parallel I/O decomposition mapping from a memory layout with a local 'patch' dimension to a netCDF variable layout with a global 'land' dimension and a 'patch' dimension.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | land_decomp_start |
The starting index of the first local 'land' index along 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. |
||
| type(dim_spec_t), | intent(in) | :: | mem_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
in-memory array. |
||
| type(dim_spec_t), | intent(in) | :: | var_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
netCDF variable. |
||
| integer, | intent(in) | :: | type |
The data type of the variable for which the decomposition is being
created using |
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 global 'patch' dimension. |
||
| type(dim_spec_t), | intent(in) | :: | mem_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
in-memory array. |
||
| type(dim_spec_t), | intent(in) | :: | var_shape_spec(:) |
An array of dim_spec_t describing the shape and dimension names of the
netCDF variable. |
||
| integer, | intent(in) | :: | type |
The data type of the variable for which the decomposition is being
created using |