NetCDF  4.4.1
 All Data Structures Files Functions Variables Typedefs Macros Modules Pages
dattinq.c
Go to the documentation of this file.
1 
9 #include "ncdispatch.h"
10  /* All these functions are part of this named group... */
15 
71 int
72 nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep,
73  size_t *lenp)
74 {
75  NC* ncp;
76  int stat = NC_check_id(ncid, &ncp);
77  if(stat != NC_NOERR) return stat;
78  return ncp->dispatch->inq_att(ncid, varid, name, xtypep, lenp);
79 }
80 
100 int
101 nc_inq_attid(int ncid, int varid, const char *name, int *idp)
102 {
103  NC* ncp;
104  int stat = NC_check_id(ncid, &ncp);
105  if(stat != NC_NOERR) return stat;
106  return ncp->dispatch->inq_attid(ncid, varid, name, idp);
107 }
108 
128 int
129 nc_inq_attname(int ncid, int varid, int attnum, char *name)
130 {
131  NC* ncp;
132  int stat = NC_check_id(ncid, &ncp);
133  if(stat != NC_NOERR) return stat;
134  return ncp->dispatch->inq_attname(ncid, varid, attnum, name);
135 }
136 
148 int
149 nc_inq_natts(int ncid, int *nattsp)
150 {
151  NC* ncp;
152  int stat = NC_check_id(ncid, &ncp);
153  if(stat != NC_NOERR) return stat;
154  if(nattsp == NULL) return NC_NOERR;
155  return ncp->dispatch->inq(ncid, NULL, NULL, nattsp, NULL);
156 }
157 
173 int
174 nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
175 {
176  NC* ncp;
177  int stat = NC_check_id(ncid, &ncp);
178  if(stat != NC_NOERR) return stat;
179  return ncp->dispatch->inq_att(ncid, varid, name, xtypep, NULL);
180 }
181 
199 int
200 nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
201 {
202  NC* ncp;
203  int stat = NC_check_id(ncid, &ncp);
204  if(stat != NC_NOERR) return stat;
205  return ncp->dispatch->inq_att(ncid, varid, name, NULL, lenp);
206 }
207  /* End of named group ...*/
int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
Find the type of an attribute.
Definition: dattinq.c:174
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:72
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:28
int nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
Find the length of an attribute.
Definition: dattinq.c:200
int nc_inq_natts(int ncid, int *nattsp)
Find number of global or group attributes.
Definition: dattinq.c:149
#define NC_NOERR
No Error.
Definition: netcdf.h:315
int nc_inq_attid(int ncid, int varid, const char *name, int *idp)
Find an attribute ID.
Definition: dattinq.c:101
int nc_inq_attname(int ncid, int varid, int attnum, char *name)
Find the name of an attribute.
Definition: dattinq.c:129

Return to the Main Unidata NetCDF page.
Generated on Tue Aug 15 2017 19:04:58 for NetCDF. NetCDF is a Unidata library.