SCORPIO  1.7.0
Functions/Subroutines
PIO_inq_var_chunking

Inquire the chunk settings for a variable in a NetCDF4 file. More...

Functions/Subroutines

integer function spio_inq_var::pio_inq_var_chunking_file_vid (file, varid, storage, chunksizes)
 Inquire the chunking settings for a variable in a NetCDF4 file. More...
 
integer function spio_inq_var::pio_inq_var_chunking_fh_vid (fh, varid, storage, chunksizes)
 Inquire the chunking settings for a variable in a NetCDF4 file. More...
 
integer function spio_inq_var::pio_inq_var_chunking_file_vdesc (file, vdesc, storage, chunksizes)
 Inquire the chunking settings for a variable in a NetCDF4 file. More...
 

Detailed Description

Inquire the chunk settings for a variable in a NetCDF4 file.

This API can be used to inquire the HDF5 chunking settings of a variable in a NetCDF4 file. An error code is returned if the provided file is not in the NetCDF4 (HDF5) file format.

Instead of storing the array based data contiguously in the output file users can split ("chunk") the data into chunks that correspond to the semantic shape of how the data is accessed in the application. Storing data in these semantic chunks that correspond to how the data is accessed in the application can significantly improve the read I/O performance of the application.

This API is a collective call (Although the library might internally choose to make progress on a single or small subset of MPI processes) on the I/O system associated with the file

Function/Subroutine Documentation

◆ pio_inq_var_chunking_fh_vid()

integer function spio_inq_var::pio_inq_var_chunking_fh_vid ( integer, intent(in)  fh,
integer, intent(in)  varid,
integer, intent(out)  storage,
integer, dimension(:), intent(out)  chunksizes 
)

Inquire the chunking settings for a variable in a NetCDF4 file.

Parameters
[in]fhThe file id/handle
[in]varidThe id of the variable
[out]storageThe storage setting for the variable. The NetCDF4/HDF5 chunking settings available.
  • PIO_CONTIGUOUS : (Default) Store data contiguously (no chunking)
  • PIO_CHUNKED : Store data in chunked format
  • PIO_COMPACT : Store data in the file header for compactness (variables < 64MB)
    Parameters
    [out]chunksizesThe chunk sizes for the variable. The size of this array should be equal to the number of dimensions of the variable and specifies the size of individual chunks (chunksizes(i) is the size of the chunk for dimension i)
    Return values
    ierr: The error return code. Set to PIO_NOERR on success, or an error code otherwise (See PIO_seterrorhandling for more information on how to customize/set error handling)

◆ pio_inq_var_chunking_file_vdesc()

integer function spio_inq_var::pio_inq_var_chunking_file_vdesc ( type(file_desc_t), intent(in)  file,
type(var_desc_t), intent(in)  vdesc,
integer, intent(out)  storage,
integer, dimension(:), intent(out)  chunksizes 
)

Inquire the chunking settings for a variable in a NetCDF4 file.

Parameters
[in]fileThe file handle. File descriptor structure. This structure holds information associated with each open file
[in]vdescThe descriptor of the variable. Variable description structure.
[out]storageThe storage setting for the variable. The NetCDF4/HDF5 chunking settings available.
  • PIO_CONTIGUOUS : (Default) Store data contiguously (no chunking)
  • PIO_CHUNKED : Store data in chunked format
  • PIO_COMPACT : Store data in the file header for compactness (variables < 64MB)
    Parameters
    [out]chunksizesThe chunk sizes for the variable. The size of this array should be equal to the number of dimensions of the variable and specifies the size of individual chunks (chunksizes(i) is the size of the chunk for dimension i)
    Return values
    ierr: The error return code. Set to PIO_NOERR on success, or an error code otherwise (See PIO_seterrorhandling for more information on how to customize/set error handling)

◆ pio_inq_var_chunking_file_vid()

integer function spio_inq_var::pio_inq_var_chunking_file_vid ( type(file_desc_t), intent(in)  file,
integer, intent(in)  varid,
integer, intent(out)  storage,
integer, dimension(:), intent(out)  chunksizes 
)

Inquire the chunking settings for a variable in a NetCDF4 file.

Parameters
[in]fileThe file handle. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable
[out]storageThe storage setting for the variable. The NetCDF4/HDF5 chunking settings available.
  • PIO_CONTIGUOUS : (Default) Store data contiguously (no chunking)
  • PIO_CHUNKED : Store data in chunked format
  • PIO_COMPACT : Store data in the file header for compactness (variables < 64MB)
    Parameters
    [out]chunksizesThe chunk sizes for the variable. The size of this array should be equal to the number of dimensions of the variable and specifies the size of individual chunks (chunksizes(i) is the size of the chunk for dimension i)
    Return values
    ierr: The error return code. Set to PIO_NOERR on success, or an error code otherwise (See PIO_seterrorhandling for more information on how to customize/set error handling)