diff --git a/app/printinfo.c b/app/printinfo.c index ccbeea0049bdb477e3734ebe858d7251880cf61f..8fd902e0b769628db06bbcf9e152f9938f603bf2 100644 --- a/app/printinfo.c +++ b/app/printinfo.c @@ -300,8 +300,8 @@ printGridInfoKernel(int gridID, int index, bool lproj) size_t xsize = (size_t) gridInqXsize(gridID); size_t ysize = (size_t) gridInqYsize(gridID); - // int prec = gridInqDatatype(gridID); - // int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7; + // int datatype; + // cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); int dig = 7; if (!lproj) @@ -537,8 +537,9 @@ printZaxisInfo(int vlistID) int ltype = 0; cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, <ype); int levelsize = zaxisInqSize(zaxisID); - // int prec = zaxisInqDatatype(zaxisID); - // int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7; + // int datatype; + // cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype); + // int dig = (datatype == CDI_DATATYPE_FLT64) ? 15 : 7; zaxisName(zaxistype, zaxisname); int length = CDI_MAX_NAME; diff --git a/examples/pio/compareResourcesArray.c b/examples/pio/compareResourcesArray.c index 0082d60caee0271025039752166cee9fd0e94bd0..4eb771089b26c079bb3cbce5fa842bab1cc4cae1 100644 --- a/examples/pio/compareResourcesArray.c +++ b/examples/pio/compareResourcesArray.c @@ -60,7 +60,7 @@ defineGrid() cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits"); cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits"); - gridDefDatatype(gridID, DOUBLE_PRECISION); + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, DOUBLE_PRECISION); gridDefTrunc(gridID, 1); cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 6); diff --git a/tests/test_resource_copy.c b/tests/test_resource_copy.c index ce789c30dabe9dfd5fbf8f62c897b1481afd9b83..ffd2c7793e01a36f2764ec7b56c31b66bdd1d596 100644 --- a/tests/test_resource_copy.c +++ b/tests/test_resource_copy.c @@ -63,7 +63,7 @@ defineGrid(void) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits"); cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits"); - gridDefDatatype(gridID, DOUBLE_PRECISION); + cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, DOUBLE_PRECISION); gridDefTrunc(gridID, 1); gridDefParamGME(gridID, 2, 3, 4, 5); @@ -164,7 +164,7 @@ defineVlist(int gridID, int zaxisID, int taxisID) cdiDefAttTxt(vlistID, varID2, "txt demo", 6, "banana"); vlistDefTaxis(vlistID, taxisID); int vlistID2 = vlistDuplicate(vlistID); - return (struct idPair){ vlistID, vlistID2 }; + return (struct idPair) { vlistID, vlistID2 }; } static int