Skip to content
Snippets Groups Projects
Commit 46ebf9d7 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced gridDefDatatype()/gridInqDatatype() by cdiDefKeyInt()/cdiInqKeyInt() with CDI_KEY_DATATYPE

parent e311236c
No related branches found
No related tags found
1 merge request!136M214003/develop
...@@ -300,8 +300,8 @@ printGridInfoKernel(int gridID, int index, bool lproj) ...@@ -300,8 +300,8 @@ printGridInfoKernel(int gridID, int index, bool lproj)
size_t xsize = (size_t) gridInqXsize(gridID); size_t xsize = (size_t) gridInqXsize(gridID);
size_t ysize = (size_t) gridInqYsize(gridID); size_t ysize = (size_t) gridInqYsize(gridID);
// int prec = gridInqDatatype(gridID); // int datatype;
// int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7; // cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype);
int dig = 7; int dig = 7;
if (!lproj) if (!lproj)
...@@ -537,8 +537,9 @@ printZaxisInfo(int vlistID) ...@@ -537,8 +537,9 @@ printZaxisInfo(int vlistID)
int ltype = 0; int ltype = 0;
cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, &ltype); cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, &ltype);
int levelsize = zaxisInqSize(zaxisID); int levelsize = zaxisInqSize(zaxisID);
// int prec = zaxisInqDatatype(zaxisID); // int datatype;
// int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7; // cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype);
// int dig = (datatype == CDI_DATATYPE_FLT64) ? 15 : 7;
zaxisName(zaxistype, zaxisname); zaxisName(zaxistype, zaxisname);
int length = CDI_MAX_NAME; int length = CDI_MAX_NAME;
......
...@@ -60,7 +60,7 @@ defineGrid() ...@@ -60,7 +60,7 @@ defineGrid()
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits"); cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits"); cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits");
gridDefDatatype(gridID, DOUBLE_PRECISION); cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, DOUBLE_PRECISION);
gridDefTrunc(gridID, 1); gridDefTrunc(gridID, 1);
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 6); cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 6);
......
...@@ -63,7 +63,7 @@ defineGrid(void) ...@@ -63,7 +63,7 @@ defineGrid(void)
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits"); cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits"); cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits");
gridDefDatatype(gridID, DOUBLE_PRECISION); cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, DOUBLE_PRECISION);
gridDefTrunc(gridID, 1); gridDefTrunc(gridID, 1);
gridDefParamGME(gridID, 2, 3, 4, 5); gridDefParamGME(gridID, 2, 3, 4, 5);
...@@ -164,7 +164,7 @@ defineVlist(int gridID, int zaxisID, int taxisID) ...@@ -164,7 +164,7 @@ defineVlist(int gridID, int zaxisID, int taxisID)
cdiDefAttTxt(vlistID, varID2, "txt demo", 6, "banana"); cdiDefAttTxt(vlistID, varID2, "txt demo", 6, "banana");
vlistDefTaxis(vlistID, taxisID); vlistDefTaxis(vlistID, taxisID);
int vlistID2 = vlistDuplicate(vlistID); int vlistID2 = vlistDuplicate(vlistID);
return (struct idPair){ vlistID, vlistID2 }; return (struct idPair) { vlistID, vlistID2 };
} }
static int static int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment