Commit 7e9681d3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed CDI_GRID_ to CDI_KEY_.

parent 6e650913
......@@ -757,15 +757,15 @@ void gridDefYvals(int gridID, const double yvals[]);
int gridInqYvals(int gridID, double yvals[]);
/* CDI grid string key values */
#define CDI_GRID_XNAME 901 // X-axis name
#define CDI_GRID_YNAME 902 // Y-axis name
#define CDI_GRID_XDIMNAME 903 // X-axis dimension name
#define CDI_GRID_YDIMNAME 904 // Y-axis dimension name
#define CDI_GRID_VDIMNAME 905 // Vertex dimension name
#define CDI_GRID_XLONGNAME 906 // X-axis longname
#define CDI_GRID_YLONGNAME 907 // Y-axis longname
#define CDI_GRID_XUNITS 908 // X-axis units
#define CDI_GRID_YUNITS 909 // Y-axis units
#define CDI_KEY_XNAME 901 // X-axis name
#define CDI_KEY_YNAME 902 // Y-axis name
#define CDI_KEY_XDIMNAME 903 // X-axis dimension name
#define CDI_KEY_YDIMNAME 904 // Y-axis dimension name
#define CDI_KEY_VDIMNAME 905 // Vertex dimension name
#define CDI_KEY_XLONGNAME 906 // X-axis longname
#define CDI_KEY_YLONGNAME 907 // Y-axis longname
#define CDI_KEY_XUNITS 908 // X-axis units
#define CDI_KEY_YUNITS 909 // Y-axis units
// cdiGridDefKeyStr: Define a CDI grid string value from a key
int cdiGridDefKeyStr(int gridID, int key, int size, const char *mesg);
......
......@@ -607,9 +607,9 @@ char *grid_key_to_string(grid_t *gridptr, int key)
switch (key)
{
case CDI_GRID_XDIMNAME: gridstring = gridptr->x.dimname; break;
case CDI_GRID_YDIMNAME: gridstring = gridptr->y.dimname; break;
case CDI_GRID_VDIMNAME: gridstring = gridptr->vdimname; break;
case CDI_KEY_XDIMNAME: gridstring = gridptr->x.dimname; break;
case CDI_KEY_YDIMNAME: gridstring = gridptr->y.dimname; break;
case CDI_KEY_VDIMNAME: gridstring = gridptr->vdimname; break;
}
return gridstring;
......
......@@ -2858,11 +2858,11 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
gridDefHasDims(ncvars[ncvarid].gridID, FALSE);
if ( xdimid != -1 )
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_XDIMNAME, (int)(strlen(ncdims[xdimid].name)+1), ncdims[xdimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_KEY_XDIMNAME, (int)(strlen(ncdims[xdimid].name)+1), ncdims[xdimid].name);
if ( ydimid != -1 )
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_YDIMNAME, (int)(strlen(ncdims[ydimid].name)+1), ncdims[ydimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_KEY_YDIMNAME, (int)(strlen(ncdims[ydimid].name)+1), ncdims[ydimid].name);
if ( vdimid != -1 )
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_VDIMNAME, (int)(strlen(ncdims[vdimid].name)+1), ncdims[vdimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_KEY_VDIMNAME, (int)(strlen(ncdims[vdimid].name)+1), ncdims[vdimid].name);
if ( CDI_Debug )
Message("gridID %d %d %s", ncvars[ncvarid].gridID, ncvarid, ncvars[ncvarid].name);
......
......@@ -845,7 +845,7 @@ static
void cdfDefXaxis(stream_t *streamptr, int gridID, int ndims)
{
cdfDefAxisCommon(streamptr, gridID, ndims, &gridInqsX, streamptr->xdimID,
CDI_GRID_XDIMNAME, 'X', finishCyclicXBounds,
CDI_KEY_XDIMNAME, 'X', finishCyclicXBounds,
streamptr->ncxvarID);
}
......@@ -860,7 +860,7 @@ static
void cdfDefYaxis(stream_t *streamptr, int gridID, int ndims)
{
cdfDefAxisCommon(streamptr, gridID, ndims, &gridInqsY, streamptr->ydimID,
CDI_GRID_YDIMNAME, 'Y', finishCyclicYBounds,
CDI_KEY_YDIMNAME, 'Y', finishCyclicYBounds,
streamptr->ncyvarID);
}
......@@ -926,7 +926,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
{
char xdimname[CDI_MAX_NAME+3];
xdimname[0] = 0;
cdiGridInqKeyStr(gridID, CDI_GRID_XDIMNAME, CDI_MAX_NAME, xdimname);
cdiGridInqKeyStr(gridID, CDI_KEY_XDIMNAME, CDI_MAX_NAME, xdimname);
if ( xdimname[0] == 0 ) { xdimname[0] = 'x'; xdimname[1] = 0; }
xdimID = checkDimName(fileID, xdimlen, xdimname);
if ( xdimID == UNDEFID ) cdf_def_dim(fileID, xdimname, xdimlen, &xdimID);
......@@ -934,7 +934,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
{
char ydimname[CDI_MAX_NAME+3];
ydimname[0] = 0;
cdiGridInqKeyStr(gridID, CDI_GRID_YDIMNAME, CDI_MAX_NAME, ydimname);
cdiGridInqKeyStr(gridID, CDI_KEY_YDIMNAME, CDI_MAX_NAME, ydimname);
if ( ydimname[0] == 0 ) { ydimname[0] = 'y'; ydimname[1] = 0; }
ydimID = checkDimName(fileID, ydimlen, ydimname);
if ( ydimID == UNDEFID ) cdf_def_dim(fileID, ydimname, ydimlen, &ydimID);
......@@ -946,7 +946,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
{
char vdimname[CDI_MAX_NAME+3];
vdimname[0] = 0;
cdiGridInqKeyStr(gridID, CDI_GRID_VDIMNAME, CDI_MAX_NAME, vdimname);
cdiGridInqKeyStr(gridID, CDI_KEY_VDIMNAME, CDI_MAX_NAME, vdimname);
if ( vdimname[0] == 0 ) strcpy(vdimname, "nv4");
size_t nvertex = 4;
nvdimID = checkDimName(fileID, nvertex, vdimname);
......@@ -1278,7 +1278,7 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
{
char xdimname[CDI_MAX_NAME+3];
xdimname[0] = 0;
cdiGridInqKeyStr(gridID, CDI_GRID_XDIMNAME, CDI_MAX_NAME, xdimname);
cdiGridInqKeyStr(gridID, CDI_KEY_XDIMNAME, CDI_MAX_NAME, xdimname);
if ( xdimname[0] == 0 ) strcpy(xdimname, "ncells");
dimID = checkDimName(fileID, dimlen, xdimname);
if ( dimID == UNDEFID ) cdf_def_dim(fileID, xdimname, dimlen, &dimID);
......@@ -1289,7 +1289,7 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
{
char vdimname[CDI_MAX_NAME+3];
vdimname[0] = 0;
cdiGridInqKeyStr(gridID, CDI_GRID_VDIMNAME, CDI_MAX_NAME, vdimname);
cdiGridInqKeyStr(gridID, CDI_KEY_VDIMNAME, CDI_MAX_NAME, vdimname);
if ( vdimname[0] == 0 ) strcpy(vdimname, "vertices");
nvdimID = checkDimName(fileID, nvertex, vdimname);
if ( nvdimID == UNDEFID ) cdf_def_dim(fileID, vdimname, nvertex, &nvdimID);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment