PIO  2.5.4
Functions
Reading Distributes Arrays

Read data from a netCDF file to a distributed array in C. More...

Functions

int PIOc_read_darray (int ncid, int varid, int ioid, PIO_Offset arraylen, void *array)
 Read a field from a file to the IO library using distributed arrays. More...
 
int PIOc_get_vard_text (int ncid, int varid, int decompid, const PIO_Offset recnum, char *buf)
 Get a muti-dimensional subset of a text variable. More...
 
int PIOc_get_vard_uchar (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned char *buf)
 Get a muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_get_vard_schar (int ncid, int varid, int decompid, const PIO_Offset recnum, signed char *buf)
 Get a muti-dimensional subset of a signed char variable. More...
 
int PIOc_get_vard_ushort (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned short *buf)
 Get a muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_get_vard_short (int ncid, int varid, int decompid, const PIO_Offset recnum, short *buf)
 Get a muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_get_vard_uint (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned int *buf)
 Get a muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_get_vard_int (int ncid, int varid, int decompid, const PIO_Offset recnum, int *buf)
 Get a muti-dimensional subset of an integer variable. More...
 
int PIOc_get_vard_float (int ncid, int varid, int decompid, const PIO_Offset recnum, float *buf)
 Get a muti-dimensional subset of a floating point variable. More...
 
int PIOc_get_vard_double (int ncid, int varid, int decompid, const PIO_Offset recnum, double *buf)
 Get a muti-dimensional subset of a 64-bit floating point variable. More...
 
int PIOc_get_vard_ulonglong (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned long long *buf)
 Get a muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int PIOc_get_vard_longlong (int ncid, int varid, int decompid, const PIO_Offset recnum, long long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_get_vard (int ncid, int varid, int decompid, const PIO_Offset recnum, void *buf)
 Get a muti-dimensional subset of a variable the same type as the variable in the file. More...
 
int nc_get_vard_text (int ncid, int varid, int decompid, const size_t recnum, char *buf)
 Get a muti-dimensional subset of a text variable. More...
 
int nc_get_vard_uchar (int ncid, int varid, int decompid, const size_t recnum, unsigned char *buf)
 Get a muti-dimensional subset of an unsigned char variable. More...
 
int nc_get_vard_schar (int ncid, int varid, int decompid, const size_t recnum, signed char *buf)
 Get a muti-dimensional subset of a signed char variable. More...
 
int nc_get_vard_ushort (int ncid, int varid, int decompid, const size_t recnum, unsigned short *buf)
 Get a muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int nc_get_vard_short (int ncid, int varid, int decompid, const size_t recnum, short *buf)
 Get a muti-dimensional subset of a 16-bit integer variable. More...
 
int nc_get_vard_uint (int ncid, int varid, int decompid, const size_t recnum, unsigned int *buf)
 Get a muti-dimensional subset of an unsigned integer variable. More...
 
int nc_get_vard_int (int ncid, int varid, int decompid, const size_t recnum, int *buf)
 Get a muti-dimensional subset of an integer variable. More...
 
int nc_get_vard_float (int ncid, int varid, int decompid, const size_t recnum, float *buf)
 Get a muti-dimensional subset of a floating point variable. More...
 
int nc_get_vard_double (int ncid, int varid, int decompid, const size_t recnum, double *buf)
 Get a muti-dimensional subset of a 64-bit floating point variable. More...
 
int nc_get_vard_ulonglong (int ncid, int varid, int decompid, const size_t recnum, unsigned long long *buf)
 Get a muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int nc_get_vard_longlong (int ncid, int varid, int decompid, const size_t recnum, long long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int nc_get_vard (int ncid, int varid, int decompid, const size_t recnum, void *buf)
 Get a muti-dimensional subset of a variable the same type as the variable in the file. More...
 

Detailed Description

Read data from a netCDF file to a distributed array in C.

Read distributed arrays from a variable in C.

Function Documentation

◆ nc_get_vard()

int nc_get_vard ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
void *  buf 
)

Get a muti-dimensional subset of a variable the same type as the variable in the file.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_double()

int nc_get_vard_double ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
double *  buf 
)

Get a muti-dimensional subset of a 64-bit floating point variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_float()

int nc_get_vard_float ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
float *  buf 
)

Get a muti-dimensional subset of a floating point variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_int()

int nc_get_vard_int ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
int *  buf 
)

Get a muti-dimensional subset of an integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_longlong()

int nc_get_vard_longlong ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
long long *  buf 
)

Get a muti-dimensional subset of a 64-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_schar()

int nc_get_vard_schar ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
signed char *  buf 
)

Get a muti-dimensional subset of a signed char variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_short()

int nc_get_vard_short ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
short *  buf 
)

Get a muti-dimensional subset of a 16-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_text()

int nc_get_vard_text ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
char *  buf 
)

Get a muti-dimensional subset of a text variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_uchar()

int nc_get_vard_uchar ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
unsigned char *  buf 
)

Get a muti-dimensional subset of an unsigned char variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_uint()

int nc_get_vard_uint ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
unsigned int *  buf 
)

Get a muti-dimensional subset of an unsigned integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_ulonglong()

int nc_get_vard_ulonglong ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
unsigned long long *  buf 
)

Get a muti-dimensional subset of an unsigned 64-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_get_vard_ushort()

int nc_get_vard_ushort ( int  ncid,
int  varid,
int  decompid,
const size_t  recnum,
unsigned short *  buf 
)

Get a muti-dimensional subset of an unsigned 16-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard()

int PIOc_get_vard ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
void *  buf 
)

Get a muti-dimensional subset of a variable the same type as the variable in the file.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_double()

int PIOc_get_vard_double ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
double *  buf 
)

Get a muti-dimensional subset of a 64-bit floating point variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_float()

int PIOc_get_vard_float ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
float *  buf 
)

Get a muti-dimensional subset of a floating point variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_int()

int PIOc_get_vard_int ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
int *  buf 
)

Get a muti-dimensional subset of an integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_longlong()

int PIOc_get_vard_longlong ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
long long *  buf 
)

Get a muti-dimensional subset of a 64-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_schar()

int PIOc_get_vard_schar ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
signed char *  buf 
)

Get a muti-dimensional subset of a signed char variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_short()

int PIOc_get_vard_short ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
short *  buf 
)

Get a muti-dimensional subset of a 16-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_text()

int PIOc_get_vard_text ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
char *  buf 
)

Get a muti-dimensional subset of a text variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_uchar()

int PIOc_get_vard_uchar ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
unsigned char *  buf 
)

Get a muti-dimensional subset of an unsigned char variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_uint()

int PIOc_get_vard_uint ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
unsigned int *  buf 
)

Get a muti-dimensional subset of an unsigned integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_ulonglong()

int PIOc_get_vard_ulonglong ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
unsigned long long *  buf 
)

Get a muti-dimensional subset of an unsigned 64-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_get_vard_ushort()

int PIOc_get_vard_ushort ( int  ncid,
int  varid,
int  decompid,
const PIO_Offset  recnum,
unsigned short *  buf 
)

Get a muti-dimensional subset of an unsigned 16-bit integer variable.

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
decompidthe decomposition ID.
recnumthe record number.
bufpointer that will get the data.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_read_darray()

int PIOc_read_darray ( int  ncid,
int  varid,
int  ioid,
PIO_Offset  arraylen,
void *  array 
)

Read a field from a file to the IO library using distributed arrays.

Parameters
ncididentifies the netCDF file.
varidthe variable ID to be read.
ioidthe I/O description ID as passed back by PIOc_InitDecomp().
arraylenthis parameter is ignored. Nominally it is the length of the array to be read. This is the length of the distrubited array. That is, the length of the portion of the data that is on the processor. This is already known because it is in the decomposition.
arraypointer to the data to be read. This is a pointer to the distributed portion of the array that is on this processor.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett