NetCDF  4.8.1
dattinq.c
Go to the documentation of this file.
1 /* Copyright 2018 University Corporation for Atmospheric
2 Research/Unidata. See \ref copyright file for more info. */
9 #include "ncdispatch.h"
10  /* All these functions are part of this named group... */
16 
84 int
85 nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep,
86  size_t *lenp)
87 {
88  NC* ncp;
89  int stat = NC_check_id(ncid, &ncp);
90  if(stat != NC_NOERR) return stat;
91  return ncp->dispatch->inq_att(ncid, varid, name, xtypep, lenp);
92 }
93 
162 int
163 nc_inq_attid(int ncid, int varid, const char *name, int *idp)
164 {
165  NC* ncp;
166  int stat = NC_check_id(ncid, &ncp);
167  if(stat != NC_NOERR) return stat;
168  return ncp->dispatch->inq_attid(ncid, varid, name, idp);
169 }
170 
253 int
254 nc_inq_attname(int ncid, int varid, int attnum, char *name)
255 {
256  NC* ncp;
257  int stat = NC_check_id(ncid, &ncp);
258  if(stat != NC_NOERR) return stat;
259  return ncp->dispatch->inq_attname(ncid, varid, attnum, name);
260 }
261 
298 int
299 nc_inq_natts(int ncid, int *nattsp)
300 {
301  NC* ncp;
302  int stat = NC_check_id(ncid, &ncp);
303  if(stat != NC_NOERR) return stat;
304  if(nattsp == NULL) return NC_NOERR;
305  return ncp->dispatch->inq(ncid, NULL, NULL, nattsp, NULL);
306 }
307 
356 int
357 nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
358 {
359  NC* ncp;
360  int stat = NC_check_id(ncid, &ncp);
361  if(stat != NC_NOERR) return stat;
362  return ncp->dispatch->inq_att(ncid, varid, name, xtypep, NULL);
363 }
364 
422 int
423 nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
424 {
425  NC* ncp;
426  int stat = NC_check_id(ncid, &ncp);
427  if(stat != NC_NOERR) return stat;
428  return ncp->dispatch->inq_att(ncid, varid, name, NULL, lenp);
429 }
430  /* End of named group ...*/
NC_NOERR
#define NC_NOERR
No Error.
Definition: netcdf.h:333
nc_inq_attlen
int nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
Definition: dattinq.c:423
nc_inq_attid
int nc_inq_attid(int ncid, int varid, const char *name, int *idp)
Definition: dattinq.c:163
nc_inq_atttype
int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
Definition: dattinq.c:357
nc_inq_natts
int nc_inq_natts(int ncid, int *nattsp)
Definition: dattinq.c:299
nc_inq_att
int nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
Definition: dattinq.c:85
nc_type
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:25
nc_inq_attname
int nc_inq_attname(int ncid, int varid, int attnum, char *name)
Definition: dattinq.c:254