netCDF  4.2.1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
dvarinq.c
Go to the documentation of this file.
1 
8 #include "ncdispatch.h"
9  /* All these functions are part of this named group... */
14 
51 int
52 nc_inq_varid(int ncid, const char *name, int *varidp)
53 {
54  NC* ncp;
55  int stat = NC_check_id(ncid, &ncp);
56  if(stat != NC_NOERR) return stat;
57  return ncp->dispatch->inq_varid(ncid, name, varidp);
58 }
59 
115 int
116 nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep,
117  int *ndimsp, int *dimidsp, int *nattsp)
118 {
119  NC* ncp;
120  int stat = NC_check_id(ncid, &ncp);
121  if(stat != NC_NOERR) return stat;
122  return ncp->dispatch->inq_var_all(ncid, varid, name, xtypep, ndimsp,
123  dimidsp, nattsp, NULL, NULL, NULL,
124  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
125 }
126 
145 int
146 nc_inq_varname(int ncid, int varid, char *name)
147 {
148  return nc_inq_var(ncid, varid, name, NULL, NULL,
149  NULL, NULL);
150 }
151 
167 int
168 nc_inq_vartype(int ncid, int varid, nc_type *typep)
169 {
170  return nc_inq_var(ncid, varid, NULL, typep, NULL,
171  NULL, NULL);
172 }
173 
190 int
191 nc_inq_varndims(int ncid, int varid, int *ndimsp)
192 {
193  return nc_inq_var(ncid, varid, NULL, NULL, ndimsp, NULL, NULL);
194 }
195 
212 int
213 nc_inq_vardimid(int ncid, int varid, int *dimidsp)
214 {
215  return nc_inq_var(ncid, varid, NULL, NULL, NULL,
216  dimidsp, NULL);
217 }
218 
235 int
236 nc_inq_varnatts(int ncid, int varid, int *nattsp)
237 {
238  if (varid == NC_GLOBAL)
239  return nc_inq_natts(ncid,nattsp);
240  /*else*/
241  return nc_inq_var(ncid, varid, NULL, NULL, NULL, NULL,
242  nattsp);
243 }
244 
245 #ifdef USE_NETCDF4
246 
272 int
273 nc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep,
274  int *deflate_levelp)
275 {
276  NC* ncp;
277  int stat = NC_check_id(ncid,&ncp);
278  if(stat != NC_NOERR) return stat;
279  return ncp->dispatch->inq_var_all(
280  ncid, varid,
281  NULL, /*name*/
282  NULL, /*xtypep*/
283  NULL, /*ndimsp*/
284  NULL, /*dimidsp*/
285  NULL, /*nattsp*/
286  shufflep, /*shufflep*/
287  deflatep, /*deflatep*/
288  deflate_levelp, /*deflatelevelp*/
289  NULL, /*fletcher32p*/
290  NULL, /*contiguousp*/
291  NULL, /*chunksizep*/
292  NULL, /*nofillp*/
293  NULL, /*fillvaluep*/
294  NULL, /*endianp*/
295  NULL, /*optionsmaskp*/
296  NULL /*pixelsp*/
297  );
298 }
299 
327 int
328 nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp)
329 {
330  NC* ncp;
331  int stat = NC_check_id(ncid,&ncp);
332  if(stat != NC_NOERR) return stat;
333  return ncp->dispatch->inq_var_all(
334  ncid, varid,
335  NULL, /*name*/
336  NULL, /*xtypep*/
337  NULL, /*ndimsp*/
338  NULL, /*dimidsp*/
339  NULL, /*nattsp*/
340  NULL, /*shufflep*/
341  NULL, /*deflatep*/
342  NULL, /*deflatelevelp*/
343  NULL, /*fletcher32p*/
344  NULL, /*contiguousp*/
345  NULL, /*chunksizep*/
346  NULL, /*nofillp*/
347  NULL, /*fillvaluep*/
348  NULL, /*endianp*/
349  options_maskp, /*optionsmaskp*/
350  pixels_per_blockp /*pixelsp*/
351  );
352 }
353 
374 int
375 nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
376 {
377  NC* ncp;
378  int stat = NC_check_id(ncid,&ncp);
379  if(stat != NC_NOERR) return stat;
380  return ncp->dispatch->inq_var_all(
381  ncid, varid,
382  NULL, /*name*/
383  NULL, /*xtypep*/
384  NULL, /*ndimsp*/
385  NULL, /*dimidsp*/
386  NULL, /*nattsp*/
387  NULL, /*shufflep*/
388  NULL, /*deflatep*/
389  NULL, /*deflatelevelp*/
390  fletcher32p, /*fletcher32p*/
391  NULL, /*contiguousp*/
392  NULL, /*chunksizep*/
393  NULL, /*nofillp*/
394  NULL, /*fillvaluep*/
395  NULL, /*endianp*/
396  NULL, /*optionsmaskp*/
397  NULL /*pixelsp*/
398  );
399 }
400 
423 int
424 nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp)
425 {
426  NC *ncp;
427  int stat = NC_check_id(ncid, &ncp);
428  if(stat != NC_NOERR) return stat;
429  return ncp->dispatch->inq_var_all(ncid, varid, NULL, NULL, NULL, NULL,
430  NULL, NULL, NULL, NULL, NULL, storagep,
431  chunksizesp, NULL, NULL, NULL, NULL, NULL);
432 }
433 
457 int
458 nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep)
459 {
460  NC* ncp;
461  int stat = NC_check_id(ncid,&ncp);
462  if(stat != NC_NOERR) return stat;
463  return ncp->dispatch->inq_var_all(
464  ncid, varid,
465  NULL, /*name*/
466  NULL, /*xtypep*/
467  NULL, /*ndimsp*/
468  NULL, /*dimidsp*/
469  NULL, /*nattsp*/
470  NULL, /*shufflep*/
471  NULL, /*deflatep*/
472  NULL, /*deflatelevelp*/
473  NULL, /*fletcher32p*/
474  NULL, /*contiguousp*/
475  NULL, /*chunksizep*/
476  no_fill, /*nofillp*/
477  fill_valuep, /*fillvaluep*/
478  NULL, /*endianp*/
479  NULL, /*optionsmaskp*/
480  NULL /*pixelsp*/
481  );
482 }
483 
505 int
506 nc_inq_var_endian(int ncid, int varid, int *endianp)
507 {
508  NC* ncp;
509  int stat = NC_check_id(ncid,&ncp);
510  if(stat != NC_NOERR) return stat;
511  return ncp->dispatch->inq_var_all(
512  ncid, varid,
513  NULL, /*name*/
514  NULL, /*xtypep*/
515  NULL, /*ndimsp*/
516  NULL, /*dimidsp*/
517  NULL, /*nattsp*/
518  NULL, /*shufflep*/
519  NULL, /*deflatep*/
520  NULL, /*deflatelevelp*/
521  NULL, /*fletcher32p*/
522  NULL, /*contiguousp*/
523  NULL, /*chunksizep*/
524  NULL, /*nofillp*/
525  NULL, /*fillvaluep*/
526  endianp, /*endianp*/
527  NULL, /*optionsmaskp*/
528  NULL /*pixelsp*/
529  );
530 }
531 
562 int
563 nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
564 {
565  NC* ncp;
566  int stat = NC_check_id(ncid,&ncp);
567  if(stat != NC_NOERR) return stat;
568  return ncp->dispatch->inq_unlimdims(ncid, nunlimdimsp,
569  unlimdimidsp);
570 }
571 
572 #endif /* USE_NETCDF4 */
573  /* End of named group ...*/

Generated on Wed Aug 22 2012 14:39:40 for netCDF. NetCDF is a Unidata library.