Commit 6e650913 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed cdiGridDefStr to cdiGridDefKeyStr

parent c4a18d2e
......@@ -767,11 +767,11 @@ int gridInqYvals(int gridID, double yvals[]);
#define CDI_GRID_XUNITS 908 // X-axis units
#define CDI_GRID_YUNITS 909 // Y-axis units
// cdiGridDefString: Define a CDI grid string value from a key
int cdiGridDefString(int gridID, int key, int size, const char *mesg);
// cdiGridDefKeyStr: Define a CDI grid string value from a key
int cdiGridDefKeyStr(int gridID, int key, int size, const char *mesg);
// cdiGridInqString: Get a CDI grid string value from a key
int cdiGridInqString(int gridID, int key, int size, char *mesg);
// cdiGridInqKeyStr: Get a CDI grid string value from a key
int cdiGridInqKeyStr(int gridID, int key, int size, char *mesg);
/* gridDefXname: Define the name of a X-axis */
void gridDefXname(int gridID, const char *xname);
......
......@@ -327,8 +327,8 @@ FCALLSCFUN2 (INT, gridInqYvals, GRIDINQYVALS, gridinqyvals, INT, DOUBLEV)
/* CDI grid string key values */
FCALLSCFUN4 (INT, cdiGridDefString, CDIGRIDDEFSTRING, cdigriddefstring, INT, INT, INT, STRING)
FCALLSCFUN4 (INT, cdiGridInqString, CDIGRIDINQSTRING, cdigridinqstring, INT, INT, INT, PSTRING)
FCALLSCFUN4 (INT, cdiGridDefKeyStr, CDIGRIDDEFSTRING, cdigriddefstring, INT, INT, INT, STRING)
FCALLSCFUN4 (INT, cdiGridInqKeyStr, CDIGRIDINQSTRING, cdigridinqstring, INT, INT, INT, PSTRING)
FCALLSCSUB2 (gridDefXname, GRIDDEFXNAME, griddefxname, INT, STRING)
FCALLSCSUB2 (gridInqXname, GRIDINQXNAME, gridinqxname, INT, PSTRING)
FCALLSCSUB2 (gridDefXlongname, GRIDDEFXLONGNAME, griddefxlongname, INT, STRING)
......
......@@ -616,10 +616,10 @@ char *grid_key_to_string(grid_t *gridptr, int key)
}
/*
@Function cdiGridDefString
@Function cdiGridDefKeyStr
@Title Define a CDI grid string value from a key
@Prototype int cdiGridDefString(int gridID, int key, int size, const char *mesg)
@Prototype int cdiGridDefKeyStr(int gridID, int key, int size, const char *mesg)
@Parameter
@Item gridID Grid ID, from a previous call to @fref{gridCreate}.
@Item key The key to be searched
......@@ -627,14 +627,14 @@ char *grid_key_to_string(grid_t *gridptr, int key)
@Item mesg The address of a string where the data will be read
@Description
The function @func{cdiGridDefString} defines a CDI grid string value from a key.
The function @func{cdiGridDefKeyStr} defines a CDI grid string value from a key.
@Result
@func{cdiGridDefString} returns 0 if OK and integer value on error.
@func{cdiGridDefKeyStr} returns 0 if OK and integer value on error.
@EndFunction
*/
int cdiGridDefString(int gridID, int key, int size, const char *mesg)
int cdiGridDefKeyStr(int gridID, int key, int size, const char *mesg)
{
if ( size < 1 || mesg == NULL || *mesg == 0 ) return -1;
......@@ -654,10 +654,10 @@ int cdiGridDefString(int gridID, int key, int size, const char *mesg)
}
/*
@Function cdiGridInqString
@Function cdiGridInqKeyStr
@Title Get a CDI grid string value from a key
@Prototype int cdiGridInqString(int gridID, int key, int size, char *mesg)
@Prototype int cdiGridInqKeyStr(int gridID, int key, int size, char *mesg)
@Parameter
@Item gridID Grid ID, from a previous call to @fref{gridCreate}.
@Item key The key to be searched.
......@@ -668,14 +668,14 @@ int cdiGridDefString(int gridID, int key, int size, const char *mesg)
is given by the predefined constant @func{CDI_MAX_NAME}.
@Description
The function @func{cdiGridInqString} return a CDI grid string value from a key.
The function @func{cdiGridInqKeyStr} return a CDI grid string value from a key.
@Result
@func{cdiGridInqString} returns 0 if OK and integer value on error.
@func{cdiGridInqKeyStr} returns 0 if OK and integer value on error.
@EndFunction
*/
int cdiGridInqString(int gridID, int key, int size, char *mesg)
int cdiGridInqKeyStr(int gridID, int key, int size, char *mesg)
{
if ( size < 1 || mesg == NULL ) return -1;
......
......@@ -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 )
cdiGridDefString(ncvars[ncvarid].gridID, CDI_GRID_XDIMNAME, (int)(strlen(ncdims[xdimid].name)+1), ncdims[xdimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_XDIMNAME, (int)(strlen(ncdims[xdimid].name)+1), ncdims[xdimid].name);
if ( ydimid != -1 )
cdiGridDefString(ncvars[ncvarid].gridID, CDI_GRID_YDIMNAME, (int)(strlen(ncdims[ydimid].name)+1), ncdims[ydimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_YDIMNAME, (int)(strlen(ncdims[ydimid].name)+1), ncdims[ydimid].name);
if ( vdimid != -1 )
cdiGridDefString(ncvars[ncvarid].gridID, CDI_GRID_VDIMNAME, (int)(strlen(ncdims[vdimid].name)+1), ncdims[vdimid].name);
cdiGridDefKeyStr(ncvars[ncvarid].gridID, CDI_GRID_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);
......
......@@ -769,7 +769,7 @@ cdfDefAxisCommon(stream_t *streamptr, int gridID, int ndims,
dimname[0] = 0;
if ( pvals == NULL )
cdiGridInqString(gridID, dimKey, CDI_MAX_NAME, dimname);
cdiGridInqKeyStr(gridID, dimKey, CDI_MAX_NAME, dimname);
if ( dimname[0] == 0 ) strcpy(dimname, extendedAxisname);
dimID = checkDimName(fileID, dimlen, dimname);
......@@ -926,7 +926,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
{
char xdimname[CDI_MAX_NAME+3];
xdimname[0] = 0;
cdiGridInqString(gridID, CDI_GRID_XDIMNAME, CDI_MAX_NAME, xdimname);
cdiGridInqKeyStr(gridID, CDI_GRID_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;
cdiGridInqString(gridID, CDI_GRID_YDIMNAME, CDI_MAX_NAME, ydimname);
cdiGridInqKeyStr(gridID, CDI_GRID_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;
cdiGridInqString(gridID, CDI_GRID_VDIMNAME, CDI_MAX_NAME, vdimname);
cdiGridInqKeyStr(gridID, CDI_GRID_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;
cdiGridInqString(gridID, CDI_GRID_XDIMNAME, CDI_MAX_NAME, xdimname);
cdiGridInqKeyStr(gridID, CDI_GRID_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;
cdiGridInqString(gridID, CDI_GRID_VDIMNAME, CDI_MAX_NAME, vdimname);
cdiGridInqKeyStr(gridID, CDI_GRID_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