Loading...
Searching...
No Matches
dattinq.c
Go to the documentation of this file.
/* Copyright 2018 University Corporation for Atmospheric
Research/Unidata. See \ref copyright file for more info. */
#include "ncdispatch.h"
/* All these functions are part of this named group... */
int
nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep,
size_t *lenp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_att(ncid, varid, name, xtypep, lenp);
}
int
nc_inq_attid(int ncid, int varid, const char *name, int *idp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_attid(ncid, varid, name, idp);
}
int
nc_inq_attname(int ncid, int varid, int attnum, char *name)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_attname(ncid, varid, attnum, name);
}
int
nc_inq_natts(int ncid, int *nattsp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
if(nattsp == NULL) return NC_NOERR;
return ncp->dispatch->inq(ncid, NULL, NULL, nattsp, NULL);
}
int
nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_att(ncid, varid, name, xtypep, NULL);
}
int
nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_att(ncid, varid, name, NULL, lenp);
}
/* End of named group ...*/
nc_inq_attid
int nc_inq_attid(int ncid, int varid, const char *name, int *idp)
Find an attribute ID.
Definition dattinq.c:164
nc_inq_natts
int nc_inq_natts(int ncid, int *nattsp)
Find number of global or group attributes.
Definition dattinq.c:300
nc_inq_att
int nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
Return information about a netCDF attribute.
Definition dattinq.c:86
nc_inq_atttype
int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
Find the type of an attribute.
Definition dattinq.c:358
nc_inq_attname
int nc_inq_attname(int ncid, int varid, int attnum, char *name)
Find the name of an attribute.
Definition dattinq.c:255
nc_inq_attlen
int nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
Find the length of an attribute.
Definition dattinq.c:424
NC_NOERR
#define NC_NOERR
No Error.
Definition netcdf.h:417
nc_type
int nc_type
The nc_type type is just an int.
Definition netcdf.h:25