Loading...
Searching...
No Matches
ddim.c
Go to the documentation of this file.
/* Copyright 2018 University Corporation for Atmospheric
Research/Unidata. See COPYRIGHT file for more info. */
#include "ncdispatch.h"
int
nc_def_dim(int ncid, const char *name, size_t len, int *idp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
TRACE(nc_def_dim);
return ncp->dispatch->def_dim(ncid, name, len, idp);
}
int
nc_inq_dimid(int ncid, const char *name, int *idp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
TRACE(nc_inq_dimid);
return ncp->dispatch->inq_dimid(ncid,name,idp);
}
int
nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
TRACE(nc_inq_dim);
return ncp->dispatch->inq_dim(ncid,dimid,name,lenp);
}
int
nc_rename_dim(int ncid, int dimid, const char *name)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
TRACE(nc_rename_dim);
return ncp->dispatch->rename_dim(ncid,dimid,name);
}
int
nc_inq_ndims(int ncid, int *ndimsp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
if(ndimsp == NULL) return NC_NOERR;
TRACE(nc_inq_ndims);
return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
}
int
nc_inq_unlimdim(int ncid, int *unlimdimidp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
TRACE(nc_inq_unlimdim);
return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
}
int
nc_inq_dimname(int ncid, int dimid, char *name)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
if(name == NULL) return NC_NOERR;
TRACE(nc_inq_dimname);
return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
}
int
nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
if(lenp == NULL) return NC_NOERR;
TRACE(nc_inq_dimlen);
return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
}
nc_inq_ndims
int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
Definition ddim.c:317
nc_inq_dimlen
int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
Definition ddim.c:467
nc_inq_dimname
int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition ddim.c:409
nc_def_dim
int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
Definition ddim.c:121
nc_rename_dim
int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition ddim.c:285
nc_inq_dim
int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
Definition ddim.c:216
nc_inq_unlimdim
int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
Definition ddim.c:350
nc_inq_dimid
int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
Definition ddim.c:152
NC_NOERR
#define NC_NOERR
No Error.
Definition netcdf.h:378