PIO  2.5.4
Functions
Write an Attribute

Functions

int PIOc_put_att (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const void *op)
 Write a netCDF attribute of any type. More...
 
int PIOc_put_att_schar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const signed char *op)
 Write a netCDF attribute array of 8-bit signed chars. More...
 
int PIOc_put_att_long (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long *op)
 Write a netCDF attribute array of 32-bit signed integers. More...
 
int PIOc_put_att_int (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const int *op)
 Write a netCDF attribute array of 32-bit signed integers. More...
 
int PIOc_put_att_uchar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned char *op)
 Write a netCDF attribute array of 8-bit unsigned chars. More...
 
int PIOc_put_att_longlong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long long *op)
 Write a netCDF attribute array of 64-bit signed integers. More...
 
int PIOc_put_att_uint (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned int *op)
 Write a netCDF attribute array of 32-bit unsigned integers. More...
 
int PIOc_put_att_float (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const float *op)
 Write a netCDF attribute array of 32-bit floating points. More...
 
int PIOc_put_att_ulonglong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned long long *op)
 Write a netCDF attribute array of 64-bit unsigned integers. More...
 
int PIOc_put_att_ushort (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned short *op)
 Write a netCDF attribute array of 16-bit unsigned integers. More...
 
int PIOc_put_att_text (int ncid, int varid, const char *name, PIO_Offset len, const char *op)
 Write a netCDF text attribute. More...
 
int PIOc_put_att_short (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const short *op)
 Write a netCDF attribute array of 16-bit integers. More...
 
int PIOc_put_att_double (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const double *op)
 Write a netCDF attribute array of 64-bit floating points. More...
 

Detailed Description

Create an attribute in C.

Function Documentation

◆ PIOc_put_att()

int PIOc_put_att ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const void *  op 
)

Write a netCDF attribute of any type.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_double()

int PIOc_put_att_double ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const double *  op 
)

Write a netCDF attribute array of 64-bit floating points.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_float()

int PIOc_put_att_float ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const float *  op 
)

Write a netCDF attribute array of 32-bit floating points.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_int()

int PIOc_put_att_int ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const int *  op 
)

Write a netCDF attribute array of 32-bit signed integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_long()

int PIOc_put_att_long ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const long *  op 
)

Write a netCDF attribute array of 32-bit signed integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_longlong()

int PIOc_put_att_longlong ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const long long *  op 
)

Write a netCDF attribute array of 64-bit signed integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_schar()

int PIOc_put_att_schar ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const signed char *  op 
)

Write a netCDF attribute array of 8-bit signed chars.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_short()

int PIOc_put_att_short ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const short *  op 
)

Write a netCDF attribute array of 16-bit integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_text()

int PIOc_put_att_text ( int  ncid,
int  varid,
const char *  name,
PIO_Offset  len,
const char *  op 
)

Write a netCDF text 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.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_uchar()

int PIOc_put_att_uchar ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const unsigned char *  op 
)

Write a netCDF attribute array of 8-bit unsigned chars.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_uint()

int PIOc_put_att_uint ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const unsigned int *  op 
)

Write a netCDF attribute array of 32-bit unsigned integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_ulonglong()

int PIOc_put_att_ulonglong ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const unsigned long long *  op 
)

Write a netCDF attribute array of 64-bit unsigned integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_put_att_ushort()

int PIOc_put_att_ushort ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
PIO_Offset  len,
const unsigned short *  op 
)

Write a netCDF attribute array of 16-bit unsigned integers.

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.
xtypethe nc_type of the attribute.
lenthe length of the attribute array.
opa pointer with the attribute data.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett