![]() |
NetCDF
4.8.0
|
#include "nc.h"
#include "nc4internal.h"
#include "nc4dispatch.h"
#include "ncdispatch.h"
Go to the source code of this file.
Functions | |
int | nc4_get_att (int ncid, int varid, const char *name, nc_type *xtype, nc_type mem_type, size_t *lenp, int *attnum, void *data) |
int | NC4_get_att (int ncid, int varid, const char *name, void *value, nc_type memtype) |
int | nc4_get_att_ptrs (NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, const char *name, nc_type *xtype, nc_type mem_type, size_t *lenp, int *attnum, void *data) |
int | NC4_inq_att (int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp) |
int | NC4_inq_attid (int ncid, int varid, const char *name, int *attnump) |
int | NC4_inq_attname (int ncid, int varid, int attnum, char *name) |
This file is part of netcdf-4, a netCDF-like interface for HDF5, or a HDF5 backend for netCDF, depending on your point of view.
This file handles the nc4 attribute functions.
Remember that with atts, type conversion can take place when writing them, and when reading them.
Definition in file nc4attr.c.
int nc4_get_att | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
nc_type * | xtype, | ||
nc_type | mem_type, | ||
size_t * | lenp, | ||
int * | attnum, | ||
void * | data | ||
) |
Get or put attribute metadata from our linked list of file info. Always locate the attribute by name, never by attnum. The mem_type is ignored if data=NULL.
ncid | File and group ID. |
varid | Variable ID. |
name | Name of attribute. |
xtype | Pointer that gets (file) type of attribute. Ignored if NULL. |
mem_type | The type of attribute data in memory. |
lenp | Pointer that gets length of attribute array. Ignored if NULL. |
attnum | Pointer that gets the index number of this attribute. Ignored if NULL. |
data | Pointer that gets attribute data. Ignored if NULL. |
int NC4_get_att | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
void * | value, | ||
nc_type | memtype | ||
) |
int nc4_get_att_ptrs | ( | NC_FILE_INFO_T * | h5, |
NC_GRP_INFO_T * | grp, | ||
NC_VAR_INFO_T * | var, | ||
const char * | name, | ||
nc_type * | xtype, | ||
nc_type | mem_type, | ||
size_t * | lenp, | ||
int * | attnum, | ||
void * | data | ||
) |
Get or put attribute metadata from our linked list of file info. Always locate the attribute by name, never by attnum. The mem_type is ignored if data=NULL.
ncid | File and group ID. |
varid | Variable ID. |
name | Name of attribute. Must already be normalized. |
xtype | Pointer that gets (file) type of attribute. Ignored if NULL. |
mem_type | The type of attribute data in memory. |
lenp | Pointer that gets length of attribute array. Ignored if NULL. |
attnum | Pointer that gets the index number of this attribute. Ignored if NULL. |
data | Pointer that gets attribute data. Ignored if NULL. |
int NC4_inq_att | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
nc_type * | xtypep, | ||
size_t * | lenp | ||
) |
Learn about an att. All the nc4 nc_inq_ functions just call nc4_get_att to get the metadata on an attribute.
ncid | File and group ID. |
varid | Variable ID. |
name | Name of attribute. |
xtypep | Pointer that gets type of attribute. |
lenp | Pointer that gets length of attribute data array. |
int NC4_inq_attid | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
int * | attnump | ||
) |
int NC4_inq_attname | ( | int | ncid, |
int | varid, | ||
int | attnum, | ||
char * | name | ||
) |