PIO  2.5.4
Functions
Get Attribute Values

Functions

int PIOc_get_att (int ncid, int varid, const char *name, void *ip)
 Get the value of an attribute of any type, with no type conversion. More...
 
int PIOc_get_att_double (int ncid, int varid, const char *name, double *ip)
 Get the value of an 64-bit floating point array attribute. More...
 
int PIOc_get_att_uchar (int ncid, int varid, const char *name, unsigned char *ip)
 Get the value of an 8-bit unsigned char array attribute. More...
 
int PIOc_get_att_ushort (int ncid, int varid, const char *name, unsigned short *ip)
 Get the value of an 16-bit unsigned integer array attribute. More...
 
int PIOc_get_att_uint (int ncid, int varid, const char *name, unsigned int *ip)
 Get the value of an 32-bit unsigned integer array attribute. More...
 
int PIOc_get_att_long (int ncid, int varid, const char *name, long *ip)
 Get the value of an 32-bit ingeger array attribute. More...
 
int PIOc_get_att_text (int ncid, int varid, const char *name, char *ip)
 Get the value of an text attribute. More...
 
int PIOc_get_att_schar (int ncid, int varid, const char *name, signed char *ip)
 Get the value of an 8-bit signed char array attribute. More...
 
int PIOc_get_att_ulonglong (int ncid, int varid, const char *name, unsigned long long *ip)
 Get the value of an 64-bit unsigned integer array attribute. More...
 
int PIOc_get_att_short (int ncid, int varid, const char *name, short *ip)
 Get the value of an 16-bit integer array attribute. More...
 
int PIOc_get_att_int (int ncid, int varid, const char *name, int *ip)
 Get the value of an 32-bit integer array attribute. More...
 
int PIOc_get_att_longlong (int ncid, int varid, const char *name, long long *ip)
 Get the value of an 64-bit integer array attribute. More...
 
int PIOc_get_att_float (int ncid, int varid, const char *name, float *ip)
 Get the value of an 32-bit floating point array attribute. More...
 

Detailed Description

Get the values stored in an attribute in C.

Function Documentation

◆ PIOc_get_att()

int PIOc_get_att ( int  ncid,
int  varid,
const char *  name,
void *  ip 
)

Get the value of an attribute of any type, with no type conversion.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_double()

int PIOc_get_att_double ( int  ncid,
int  varid,
const char *  name,
double *  ip 
)

Get the value of an 64-bit floating point array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_float()

int PIOc_get_att_float ( int  ncid,
int  varid,
const char *  name,
float *  ip 
)

Get the value of an 32-bit floating point array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_int()

int PIOc_get_att_int ( int  ncid,
int  varid,
const char *  name,
int *  ip 
)

Get the value of an 32-bit integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_long()

int PIOc_get_att_long ( int  ncid,
int  varid,
const char *  name,
long *  ip 
)

Get the value of an 32-bit ingeger array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_longlong()

int PIOc_get_att_longlong ( int  ncid,
int  varid,
const char *  name,
long long *  ip 
)

Get the value of an 64-bit integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_schar()

int PIOc_get_att_schar ( int  ncid,
int  varid,
const char *  name,
signed char *  ip 
)

Get the value of an 8-bit signed char array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_short()

int PIOc_get_att_short ( int  ncid,
int  varid,
const char *  name,
short *  ip 
)

Get the value of an 16-bit integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_text()

int PIOc_get_att_text ( int  ncid,
int  varid,
const char *  name,
char *  ip 
)

Get the value of an text attribute.

There is no type conversion with this call. If the attribute is not of type NC_CHAR, then an error will be returned.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_uchar()

int PIOc_get_att_uchar ( int  ncid,
int  varid,
const char *  name,
unsigned char *  ip 
)

Get the value of an 8-bit unsigned char array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_uint()

int PIOc_get_att_uint ( int  ncid,
int  varid,
const char *  name,
unsigned int *  ip 
)

Get the value of an 32-bit unsigned integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_ulonglong()

int PIOc_get_att_ulonglong ( int  ncid,
int  varid,
const char *  name,
unsigned long long *  ip 
)

Get the value of an 64-bit unsigned integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_get_att_ushort()

int PIOc_get_att_ushort ( int  ncid,
int  varid,
const char *  name,
unsigned short *  ip 
)

Get the value of an 16-bit unsigned integer array attribute.

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

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namethe name of the attribute to get
ipa pointer that will get the attribute value.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett