netCDF  4.2.1.1
/usr/src/RPM/BUILD/libnetcdf7-seq-4.2.1.1/libdispatch/dvarinq.c
Go to the documentation of this file.
00001 
00008 #include "ncdispatch.h"
00009  /* All these functions are part of this named group... */
00014 
00051 int
00052 nc_inq_varid(int ncid, const char *name, int *varidp)
00053 {
00054    NC* ncp;
00055    int stat = NC_check_id(ncid, &ncp);
00056    if(stat != NC_NOERR) return stat;
00057    return ncp->dispatch->inq_varid(ncid, name, varidp);
00058 }
00059 
00115 int
00116 nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep,  
00117            int *ndimsp, int *dimidsp, int *nattsp)
00118 {
00119    NC* ncp;
00120    int stat = NC_check_id(ncid, &ncp);
00121    if(stat != NC_NOERR) return stat;
00122    return ncp->dispatch->inq_var_all(ncid, varid, name, xtypep, ndimsp, 
00123                                      dimidsp, nattsp, NULL, NULL, NULL, 
00124                                      NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
00125 }
00126 
00145 int 
00146 nc_inq_varname(int ncid, int varid, char *name)
00147 {
00148    return nc_inq_var(ncid, varid, name, NULL, NULL,
00149                      NULL, NULL);
00150 }
00151 
00167 int 
00168 nc_inq_vartype(int ncid, int varid, nc_type *typep)
00169 {
00170    return nc_inq_var(ncid, varid, NULL, typep, NULL,
00171                      NULL, NULL);
00172 }
00173 
00190 int 
00191 nc_inq_varndims(int ncid, int varid, int *ndimsp)
00192 {
00193    return nc_inq_var(ncid, varid, NULL, NULL, ndimsp, NULL, NULL);
00194 }
00195 
00212 int 
00213 nc_inq_vardimid(int ncid, int varid, int *dimidsp)
00214 {
00215    return nc_inq_var(ncid, varid, NULL, NULL, NULL, 
00216                      dimidsp, NULL);
00217 }
00218 
00235 int 
00236 nc_inq_varnatts(int ncid, int varid, int *nattsp)
00237 {
00238    if (varid == NC_GLOBAL)
00239       return nc_inq_natts(ncid,nattsp);
00240    /*else*/
00241    return nc_inq_var(ncid, varid, NULL, NULL, NULL, NULL, 
00242                      nattsp);
00243 }
00244 
00245 #ifdef USE_NETCDF4
00246 
00272 int
00273 nc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep, 
00274                    int *deflate_levelp)
00275 {
00276    NC* ncp;
00277    int stat = NC_check_id(ncid,&ncp);
00278    if(stat != NC_NOERR) return stat;
00279    return ncp->dispatch->inq_var_all(
00280       ncid, varid,
00281       NULL, /*name*/
00282       NULL, /*xtypep*/
00283       NULL, /*ndimsp*/
00284       NULL, /*dimidsp*/
00285       NULL, /*nattsp*/
00286       shufflep, /*shufflep*/
00287       deflatep, /*deflatep*/
00288       deflate_levelp, /*deflatelevelp*/
00289       NULL, /*fletcher32p*/
00290       NULL, /*contiguousp*/
00291       NULL, /*chunksizep*/
00292       NULL, /*nofillp*/
00293       NULL, /*fillvaluep*/
00294       NULL, /*endianp*/
00295       NULL, /*optionsmaskp*/
00296       NULL /*pixelsp*/
00297       );
00298 }
00299 
00327 int
00328 nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp)
00329 {
00330    NC* ncp;
00331    int stat = NC_check_id(ncid,&ncp);
00332    if(stat != NC_NOERR) return stat;
00333    return ncp->dispatch->inq_var_all(
00334       ncid, varid,
00335       NULL, /*name*/
00336       NULL, /*xtypep*/
00337       NULL, /*ndimsp*/
00338       NULL, /*dimidsp*/
00339       NULL, /*nattsp*/
00340       NULL, /*shufflep*/
00341       NULL, /*deflatep*/
00342       NULL, /*deflatelevelp*/
00343       NULL, /*fletcher32p*/
00344       NULL, /*contiguousp*/
00345       NULL, /*chunksizep*/
00346       NULL, /*nofillp*/
00347       NULL, /*fillvaluep*/
00348       NULL, /*endianp*/
00349       options_maskp, /*optionsmaskp*/
00350       pixels_per_blockp /*pixelsp*/
00351       );
00352 }
00353 
00374 int
00375 nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
00376 {
00377    NC* ncp;
00378    int stat = NC_check_id(ncid,&ncp);
00379    if(stat != NC_NOERR) return stat;
00380    return ncp->dispatch->inq_var_all(
00381       ncid, varid,
00382       NULL, /*name*/
00383       NULL, /*xtypep*/
00384       NULL, /*ndimsp*/
00385       NULL, /*dimidsp*/
00386       NULL, /*nattsp*/
00387       NULL, /*shufflep*/
00388       NULL, /*deflatep*/
00389       NULL, /*deflatelevelp*/
00390       fletcher32p, /*fletcher32p*/
00391       NULL, /*contiguousp*/
00392       NULL, /*chunksizep*/
00393       NULL, /*nofillp*/
00394       NULL, /*fillvaluep*/
00395       NULL, /*endianp*/
00396       NULL, /*optionsmaskp*/
00397       NULL /*pixelsp*/
00398       );
00399 }
00400 
00423 int
00424 nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp)
00425 {
00426    NC *ncp;
00427    int stat = NC_check_id(ncid, &ncp);
00428    if(stat != NC_NOERR) return stat;
00429    return ncp->dispatch->inq_var_all(ncid, varid, NULL, NULL, NULL, NULL, 
00430                                      NULL, NULL, NULL, NULL, NULL, storagep, 
00431                                      chunksizesp, NULL, NULL, NULL, NULL, NULL);
00432 }
00433 
00457 int
00458 nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep)
00459 {
00460    NC* ncp;
00461    int stat = NC_check_id(ncid,&ncp);
00462    if(stat != NC_NOERR) return stat;
00463    return ncp->dispatch->inq_var_all(
00464       ncid, varid,
00465       NULL, /*name*/
00466       NULL, /*xtypep*/
00467       NULL, /*ndimsp*/
00468       NULL, /*dimidsp*/
00469       NULL, /*nattsp*/
00470       NULL, /*shufflep*/
00471       NULL, /*deflatep*/
00472       NULL, /*deflatelevelp*/
00473       NULL, /*fletcher32p*/
00474       NULL, /*contiguousp*/
00475       NULL, /*chunksizep*/
00476       no_fill, /*nofillp*/
00477       fill_valuep, /*fillvaluep*/
00478       NULL, /*endianp*/
00479       NULL, /*optionsmaskp*/
00480       NULL /*pixelsp*/
00481       );
00482 }
00483 
00505 int
00506 nc_inq_var_endian(int ncid, int varid, int *endianp)
00507 {
00508    NC* ncp;
00509    int stat = NC_check_id(ncid,&ncp);
00510    if(stat != NC_NOERR) return stat;
00511    return ncp->dispatch->inq_var_all(
00512       ncid, varid,
00513       NULL, /*name*/
00514       NULL, /*xtypep*/
00515       NULL, /*ndimsp*/
00516       NULL, /*dimidsp*/
00517       NULL, /*nattsp*/
00518       NULL, /*shufflep*/
00519       NULL, /*deflatep*/
00520       NULL, /*deflatelevelp*/
00521       NULL, /*fletcher32p*/
00522       NULL, /*contiguousp*/
00523       NULL, /*chunksizep*/
00524       NULL, /*nofillp*/
00525       NULL, /*fillvaluep*/
00526       endianp, /*endianp*/
00527       NULL, /*optionsmaskp*/
00528       NULL /*pixelsp*/
00529       );
00530 }
00531 
00562 int
00563 nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
00564 {
00565     NC* ncp;
00566     int stat = NC_check_id(ncid,&ncp);
00567     if(stat != NC_NOERR) return stat;
00568     return ncp->dispatch->inq_unlimdims(ncid, nunlimdimsp, 
00569                                         unlimdimidsp);
00570 }
00571 
00572 #endif /* USE_NETCDF4 */
00573   /* End of named group ...*/
 All Data Structures Files Functions Variables Typedefs Defines

Generated on Sat Sep 15 2012 12:44:33 for netCDF. NetCDF is a Unidata library.