io_decomp_patch_to_patch Function

public function io_decomp_patch_to_patch(patch_decomp_start, mem_shape, var_shape, type, var_patch_index, index_map) result(decomp)

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.

Arguments

Type IntentOptional 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 CABLE_NETCDF_TYPE_* constants from cable_netcdf_mod.

integer, intent(in), optional :: var_patch_index
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.

Return Value class(cable_netcdf_decomp_t), allocatable