Interface for netCDF file handling in CABLE.
This module defines abstract types and interfaces for working with netCDF files using different underlying libraries (e.g., NetCDF Fortran, ParallelIO). Concrete implementations should extend the abstract types and implement the deferred procedures.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | CABLE_NETCDF_UNLIMITED | = | -1 |
Constant to represent an unlimited dimension length in netCDF files. |
| class(cable_netcdf_io_t), | private, | allocatable | :: | cable_netcdf_io_handler |
The internal I/O handler to use for all netCDF file operations. |
| enumerator | :: | CABLE_NETCDF_INT | = | 0 | Data type constant for 32-bit integer variables and attributes in netCDF files. |
| enumerator | :: | CABLE_NETCDF_FLOAT | = | 1 | Data type constant for 32-bit real variables and attributes in netCDF files. |
| enumerator | :: | CABLE_NETCDF_DOUBLE | = | 2 | Data type constant for 64-bit real variables and attributes in netCDF files. |
Data type constants for netCDF variables and attributes.
| enumerator | :: | CABLE_NETCDF_IOTYPE_NETCDF | = | 0 | Serial read/write of NetCDF files. |
| enumerator | :: | CABLE_NETCDF_IOTYPE_CLASSIC | = | 1 | Parallel read/write of pNetCDF files. |
| enumerator | :: | CABLE_NETCDF_IOTYPE_NETCDF4C | = | 2 | NetCDF4 (HDF5 format) file opened for compression (serial write access only). |
| enumerator | :: | CABLE_NETCDF_IOTYPE_NETCDF4P | = | 3 | NetCDF4 (HDF5 format) file opened in parallel. |
I/O type options for opening and creating files. Follows the I/O type options defined in ParallelIO: https://github.com/NCAR/ParallelIO/blob/pio2_6_8/src/flib/pio_types.F90#L102-L106
| enumerator | :: | CABLE_NETCDF_MODE_CLOBBER | = | 0 | Overwrite existing file. |
| enumerator | :: | CABLE_NETCDF_MODE_NOCLOBBER | = | 1 | Do not overwrite existing file. |
| enumerator | :: | CABLE_NETCDF_MODE_WRITE | = | 2 | Open file for writing. |
| enumerator | :: | CABLE_NETCDF_MODE_NOWRITE | = | 3 | Open file for reading only. |
File mode options for opening and creating files
Module initialization procedure for the cable_netcdf_mod module. This procedure should be called before any other procedures in this module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_grp_t), | intent(in) | :: | mpi_grp |
The MPI group for the set of processes that will be performing netCDF I/O operations. All procedures in this module should be called collectively by all processes in this group. |
Close the netCDF file and release any associated resources.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this |
End the definition mode of the netCDF file, allowing data to be written.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this |
Re-enter definition mode for the netCDF file, allowing dimensions and variables to be defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this |
Synchronize the netCDF file, ensuring that all data is written to disk and visible to other processes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this |
Define dimensions in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | dim_names(:) |
Array of dimension names to define. |
||
| integer, | intent(in) | :: | dim_lens(:) |
Array of dimension lengths corresponding to dim_names. Use
|
Define a variable in the netCDF file with the specified name, dimensions, and type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to define. |
||
| integer, | intent(in) | :: | type |
Data type of the variable, using the |
||
| character(len=*), | intent(in), | optional | :: | dim_names(:) |
Array of dimension names for the variable. If not provided, the variable will be defined as a scalar. |
Define a global attribute with a string value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to define. |
||
| character(len=*), | intent(in) | :: | att_value |
Value of the global attribute to define. |
Define a global attribute with an 32-bit integer value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to define. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | att_value |
Value of the global attribute to define. |
Define a global attribute with a 32-bit real value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to define. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | att_value |
Value of the global attribute to define. |
Define a global attribute with a 64-bit real value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to define. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | att_value |
Value of the global attribute to define. |
Define a variable attribute with a string value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to define the attribute for. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to define. |
||
| character(len=*), | intent(in) | :: | att_value |
Value of the variable attribute to define. |
Define a variable attribute with an 32-bit integer value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to define the attribute for. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to define. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | att_value |
Value of the variable attribute to define. |
Define a variable attribute with a 32-bit real value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to define the attribute for. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to define. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | att_value |
Value of the variable attribute to define. |
Define a variable attribute with a 64-bit real value in the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to define the attribute for. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to define. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | att_value |
Value of the variable attribute to define. |
Read a global attribute with a string value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to read. |
||
| character(len=*), | intent(out) | :: | att_value |
Value of the global attribute read. |
Read a global attribute with an 32-bit integer value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to read. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | att_value |
Value of the global attribute read. |
Read a global attribute with a 32-bit real value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to read. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | att_value |
Value of the global attribute read. |
Read a global attribute with a 64-bit real value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | att_name |
Name of the global attribute to read. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | att_value |
Value of the global attribute read. |
Read a variable attribute with a string value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read the attribute from. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to read. |
||
| character(len=*), | intent(out) | :: | att_value |
Value of the variable attribute read. |
Read a variable attribute with an 32-bit integer value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read the attribute from. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to read. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | att_value |
Value of the variable attribute read. |
Read a variable attribute with a 32-bit real value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read the attribute from. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to read. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | att_value |
Value of the variable attribute read. |
Read a variable attribute with a 64-bit real value from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read the attribute from. |
||
| character(len=*), | intent(in) | :: | att_name |
Name of the variable attribute to read. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | att_value |
Value of the variable attribute read. |
Inquire the length of a dimension in the netCDF file by its name.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | dim_name |
Name of the dimension to inquire. |
||
| integer, | intent(out) | :: | dim_len |
Length of the dimension returned. For unlimited dimensions, the number of records will be returned. |
Inquire the number of dimensions of a variable in the netCDF file by its name.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to inquire. |
||
| integer, | intent(out) | :: | ndims |
Number of dimensions of the variable returned. |
Write a 0-dimensional (scalar) 32-bit integer variable to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values |
Value to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 1-dimensional array of 32-bit integers to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:) |
Array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 2-dimensional array of 32-bit integers to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 3-dimensional array of 32-bit integers to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 0-dimensional (scalar) 32-bit real variable to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values |
Scalar value to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 1-dimensional array of 32-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:) |
1-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 2-dimensional array of 32-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 3-dimensional array of 32-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 0-dimensional (scalar) 64-bit real variable to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values |
The scalar value to write. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 1-dimensional array of 64-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:) |
1-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 2-dimensional array of 64-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 3-dimensional array of 64-bit real values to the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for writing the variable. If not provided, writing will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to write for each dimension. If not provided, the entire variable will be written. |
Write a 1-dimensional array of 32-bit integers to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:) |
1-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 2-dimensional array of 32-bit integers to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 3-dimensional array of 32-bit integers to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 1-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:) |
1-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 2-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 3-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 2-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:) |
1-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 2-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:,:) |
2-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Write a 3-dimensional array of 32-bit real values to the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to write to. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in) | :: | values(:,:,:) |
3-dimensional array of values to write to the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(in), | optional | :: | fill_value |
Fill value to use for any missing data. If not provided, the default fill value for the variable's type will be used. |
|
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be written to the specified frame along the unlimited dimension. |
Read a 0-dimensional (scalar) 32-bit integer variable from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values |
The scalar value read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 1-dimensional array of 32-bit integers from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will |
Read a 2-dimensional array of 32-bit integers from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 3-dimensional array of 32-bit integers from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 0-dimensional (scalar) 32-bit real variable from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values |
Scalar value to store the value read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 1-dimensional array of 32-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 2-dimensional array of 32-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 3-dimensional array of 32-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 0-dimensional (scalar) 64-bit real variable from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values |
Scalar value to store the value read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 1-dimensional array of 64-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 2-dimensional array of 64-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 3-dimensional array of 64-bit real values from the netCDF file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| integer, | intent(in), | optional | :: | start(:) |
Starting indices for reading the variable. If not provided, reading will start at the beginning of the variable. |
|
| integer, | intent(in), | optional | :: | count(:) |
Count of elements to read for each dimension. If not provided, the entire variable will be read. |
Read a 1-dimensional array of 32-bit integers from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 2-dimensional array of 32-bit integers from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 3-dimensional array of 32-bit integers from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| integer(kind=CABLE_NETCDF_INT32_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 1-dimensional array of 32-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 2-dimensional array of 32-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 3-dimensional array of 32-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL32_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 1-dimensional array of 64-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:) |
1-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 2-dimensional array of 64-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:,:) |
2-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Read a 3-dimensional array of 64-bit real values from the netCDF file using decomposition information for parallel I/O.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_file_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | var_name |
Name of the variable to read from. |
||
| real(kind=CABLE_NETCDF_REAL64_KIND), | intent(out) | :: | values(:,:,:) |
3-dimensional array to store the values read from the variable. |
||
| class(cable_netcdf_decomp_t), | intent(inout) | :: | decomp |
Decomposition information for parallel I/O. |
||
| integer, | intent(in), | optional | :: | frame |
Optional frame index for record variables. If provided, the data will be read from the specified frame along the unlimited dimension. |
Create a new netCDF file with the specified path and I/O type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_io_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | path |
Path to the netCDF file to create. |
||
| integer, | intent(in) | :: | iotype |
I/O type to use for the file using the |
||
| integer, | intent(in), | optional | :: | mode |
Optional mode flags for file creation using the |
Open an existing netCDF file with the specified path and I/O type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_io_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | path |
Path to the netCDF file to open. |
||
| integer, | intent(in) | :: | iotype |
I/O type to use for the file using the |
||
| integer, | intent(in), | optional | :: | mode |
Optional mode flags for file opening using the |
Create a new decomposition for parallel I/O. This follows the degree of freedom approach for specifying I/O decompositions as described in Denis et al. (2011) [10.1177/1094342011428143].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_io_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | compmap(:) |
An array of data offsets describing where each element of the in-memory array is located in the netCDF variable data on disk. |
||
| integer, | intent(in) | :: | dims(:) |
An array of the global dimensions used to describe the shape of the data in the netCDF file |
||
| integer, | intent(in) | :: | type |
The data type of the in-memory array using the |
Initialise the netcdf I/O handler. This procedure is called during module initialization and can be used to set up any necessary state or resources for the I/O handler.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_io_t), | intent(inout) | :: | this |
Finalise the netcdf I/O handler. This procedure is called during module finalization and can be used to clean up any resources allocated by the I/O handler.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_netcdf_io_t), | intent(inout) | :: | this |
Abstract type for describing netCDF decomposition information. This type describes 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 following the degree of freedom decomposition described in Denis et al. (2011) [10.1177/1094342011428143].
Abstract type for netCDF file handling. This type defines the interface for operations on netCDF files, such as defining dimensions and variables, writing and reading data, and managing attributes.
Abstract type defining the interface for netCDF I/O handlers. This allows for different implementations (e.g. NetCDF, ParallelIO) to be used interchangeably within the CABLE code
| procedure(cable_netcdf_io_init), public, deferred :: init | |
| procedure(cable_netcdf_io_finalise), public, deferred :: finalise | |
| procedure(cable_netcdf_io_create_file), public, deferred :: create_file | |
| procedure(cable_netcdf_io_open_file), public, deferred :: open_file | |
| procedure(cable_netcdf_io_create_decomp), public, deferred :: create_decomp |
Create a new netCDF file with the specified path and I/O type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
Path to the netCDF file to create. |
||
| integer, | intent(in) | :: | iotype |
I/O type to use for the file using the |
||
| integer, | intent(in), | optional | :: | mode |
Optional mode flags for file creation using the |
Open an existing netCDF file with the specified path and I/O type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
Path to the netCDF file to open. |
||
| integer, | intent(in) | :: | iotype |
I/O type to use for the file using the |
||
| integer, | intent(in), | optional | :: | mode |
Optional mode flags for file opening using the |
Create a new decomposition for parallel I/O. This follows the degree of freedom approach for specifying I/O decompositions as described in Denis et al. (2011) [10.1177/1094342011428143].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | compmap(:) |
An array of data offsets describing where each element of the in-memory array is located in the netCDF variable data on disk. |
||
| integer, | intent(in) | :: | dims(:) |
An array of the global dimensions used to describe the shape of the data in the netCDF file |
||
| integer, | intent(in) | :: | type |
The data type of the in-memory array using the |
Module finalization procedure for the cable_netcdf_mod module.