SCORPIO  1.7.0
Functions/Subroutines
PIO_put_var

Write ("Put") a non-distributed array. More...

Functions/Subroutines

integer function spio_put_var::pio_put_var1_text (file, varid, start, str)
 Write/Put a string to a variable (character array) in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_int (file, varid, start, val)
 Write/Put one element/datum (int) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_real (file, varid, start, val)
 Write/Put one element/datum (real) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_double (file, varid, start, val)
 Write/Put one element/datum (double) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_vdesc_text (file, vdesc, start, val)
 Write/Put one element/datum (text) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_vdesc_int (file, vdesc, start, val)
 Write/Put one element/datum (int) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_vdesc_real (file, vdesc, start, val)
 Write/Put one element/datum (real) to a variable in a file at a specified index. More...
 
integer function spio_put_var::pio_put_var1_vdesc_double (file, vdesc, start, val)
 Write/Put one element/datum (double) to a variable in a file at a specified index. More...
 

Detailed Description

Write ("Put") a non-distributed array.

This API can be used to write non-distributed arrays to a file. These arrays have the same data across all the MPI processes in the I/O system (where the file was opened/created). However note that the library may not perform data consistency (that data across all the processes are the same) checks across MPI processes.

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

Function/Subroutine Documentation

◆ pio_put_var1_double()

integer function spio_put_var::pio_put_var1_double ( type(file_desc_t), intent(in)  file,
integer, intent(in)  varid,
integer, dimension(:), intent(in)  start,
real(r8), intent(in)  val 
)

Write/Put one element/datum (double) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $double, being written out.
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_put_var1_int()

integer function spio_put_var::pio_put_var1_int ( type(file_desc_t), intent(in)  file,
integer, intent(in)  varid,
integer, dimension(:), intent(in)  start,
integer(i4), intent(in)  val 
)

Write/Put one element/datum (int) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $int, being written out.
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_put_var1_real()

integer function spio_put_var::pio_put_var1_real ( type(file_desc_t), intent(in)  file,
integer, intent(in)  varid,
integer, dimension(:), intent(in)  start,
real(r4), intent(in)  val 
)

Write/Put one element/datum (real) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $real, being written out.
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_put_var1_text()

integer function spio_put_var::pio_put_var1_text ( type(file_desc_t), intent(in)  file,
integer, intent(in)  varid,
integer, dimension(:), intent(in)  start,
character(len=*), intent(in)  str 
)

Write/Put a string to a variable (character array) in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the text string. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]strThe value, string, being written out.
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)

Write/Put a string to a variable (character array) in a file at a specified index

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the text string. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]strThe value, string, being written out.
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)

Write/Put a string to a variable (character array) in a file at a specified index

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the text string. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]strThe value, string, being written out.
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)

Write/Put a string to a variable (character array) in a file at a specified index

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]varidThe id of the variable being written out
[in]startThe variable index at which to write the text string. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]strThe value, string, being written out.
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_put_var1_vdesc_double()

integer function spio_put_var::pio_put_var1_vdesc_double ( type(file_desc_t), intent(in)  file,
type(var_desc_t), intent(in)  vdesc,
integer, dimension(:), intent(in)  start,
real(r8), intent(in)  val 
)

Write/Put one element/datum (double) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]vdescThe handle to the variable being written out. Variable description structure.
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $double, being written out.
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_put_var1_vdesc_int()

integer function spio_put_var::pio_put_var1_vdesc_int ( type(file_desc_t), intent(in)  file,
type(var_desc_t), intent(in)  vdesc,
integer, dimension(:), intent(in)  start,
integer(i4), intent(in)  val 
)

Write/Put one element/datum (int) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]vdescThe handle to the variable being written out. Variable description structure.
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $int, being written out.
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_put_var1_vdesc_real()

integer function spio_put_var::pio_put_var1_vdesc_real ( type(file_desc_t), intent(in)  file,
type(var_desc_t), intent(in)  vdesc,
integer, dimension(:), intent(in)  start,
real(r4), intent(in)  val 
)

Write/Put one element/datum (real) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]vdescThe handle to the variable being written out. Variable description structure.
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $real, being written out.
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_put_var1_vdesc_text()

integer function spio_put_var::pio_put_var1_vdesc_text ( type(file_desc_t), intent(in)  file,
type(var_desc_t), intent(in)  vdesc,
integer, dimension(:), intent(in)  start,
character(len=*), intent(in)  val 
)

Write/Put one element/datum (text) to a variable in a file at a specified index.

Parameters
[in]fileThe handle to the file. File descriptor structure. This structure holds information associated with each open file
[in]vdescThe handle to the variable being written out. Variable description structure.
[in]startThe variable index at which to write the element/datum. This argument is an array and the size of the array needs to be equal to the number of dimensions for the variable. Each element in the array corresponds to the index for the variable dimension (subscripts referring to where the value is to be written) The indices start from 1.
[in]valThe value, $text, being written out.
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)