Commit b2ed2be6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced gridInqUUID() by cdiInqKeyBytes() with CDI_KEY_UUID.

parent 44e003ba
......@@ -11,6 +11,9 @@ gridInqYname(gridID, yname) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KE
gridInqYlongname(gridID, ylongname) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, ylongname, &length)
gridInqYunits(gridID, yunits) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, yunits, &length)
gridDefUUID(zaxisID, uuidOfHGrid) -> cdiDefKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfHGrid, length)
gridInqUUID(zaxisID) -> cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfHGrid, &length)
zaxisDefXname(zaxisID, xname) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, xname)
zaxisDefXlongname(zaxisID, xlongname) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, xlongname)
zaxisDefXunits(zaxisID, xunits) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, xunits)
......@@ -617,8 +617,9 @@ static
void cdfDefGridUUID(stream_t *streamptr, int gridID)
unsigned char uuidOfHGrid[CDI_UUID_SIZE];
gridInqUUID(gridID, uuidOfHGrid);
size_t len = CDI_UUID_SIZE;
memset(uuidOfHGrid, 0, len);
cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfHGrid, &len);
if ( !cdiUUIDIsNull(uuidOfHGrid) )
char uuidOfHGridStr[37];
......@@ -2164,7 +2164,8 @@ void gribapiDefGridUnstructured(grib_handle *gh, int gridID)
unsigned char uuid[CDI_UUID_SIZE];
size_t len = CDI_UUID_SIZE;
gridInqUUID(gridID, uuid);
memset(uuid, 0, len);
cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuid, &len);
if (grib_set_bytes(gh, "uuidOfHGrid", uuid, &len) != 0)
Warning("Can't write UUID!");
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