netCDF 4.2.1.1
|
00001 00010 #include "ncdispatch.h" 00011 00109 int 00110 nc_def_dim(int ncid, const char *name, size_t len, int *idp) 00111 { 00112 NC* ncp; 00113 int stat = NC_check_id(ncid, &ncp); 00114 if(stat != NC_NOERR) return stat; 00115 return ncp->dispatch->def_dim(ncid, name, len, idp); 00116 } 00117 00138 int 00139 nc_inq_dimid(int ncid, const char *name, int *idp) 00140 { 00141 NC* ncp; 00142 int stat = NC_check_id(ncid, &ncp); 00143 if(stat != NC_NOERR) return stat; 00144 return ncp->dispatch->inq_dimid(ncid,name,idp); 00145 } 00146 00201 int 00202 nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp) 00203 { 00204 NC* ncp; 00205 int stat = NC_check_id(ncid, &ncp); 00206 if(stat != NC_NOERR) return stat; 00207 return ncp->dispatch->inq_dim(ncid,dimid,name,lenp); 00208 } 00209 00262 int 00263 nc_rename_dim(int ncid, int dimid, const char *name) 00264 { 00265 NC* ncp; 00266 int stat = NC_check_id(ncid, &ncp); 00267 if(stat != NC_NOERR) return stat; 00268 return ncp->dispatch->rename_dim(ncid,dimid,name); 00269 } 00270 00292 int 00293 nc_inq_ndims(int ncid, int *ndimsp) 00294 { 00295 NC* ncp; 00296 int stat = NC_check_id(ncid, &ncp); 00297 if(stat != NC_NOERR) return stat; 00298 if(ndimsp == NULL) return NC_NOERR; 00299 return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL); 00300 } 00301 00322 int 00323 nc_inq_unlimdim(int ncid, int *unlimdimidp) 00324 { 00325 NC* ncp; 00326 int stat = NC_check_id(ncid, &ncp); 00327 if(stat != NC_NOERR) return stat; 00328 return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp); 00329 } 00330 00380 int 00381 nc_inq_dimname(int ncid, int dimid, char *name) 00382 { 00383 NC* ncp; 00384 int stat = NC_check_id(ncid, &ncp); 00385 if(stat != NC_NOERR) return stat; 00386 if(name == NULL) return NC_NOERR; 00387 return ncp->dispatch->inq_dim(ncid,dimid,name,NULL); 00388 } 00389 00436 int 00437 nc_inq_dimlen(int ncid, int dimid, size_t *lenp) 00438 { 00439 NC* ncp; 00440 int stat = NC_check_id(ncid, &ncp); 00441 if(stat != NC_NOERR) return stat; 00442 if(lenp == NULL) return NC_NOERR; 00443 return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp); 00444 }