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

Replace gridDefReference() by cdiDefKeyString() with CDI_KEY_REFERENCEURI.

parent 6ee9223b
......@@ -15,7 +15,7 @@ gridInqYstdname(gridID, ylongname) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_
gridDefNumber(zaxisID, number) -> cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, number)
gridInqNumber(zaxisID) -> cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, &number)
gridDefPosition(zaxisID, positio) > cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, position)
gridDefPosition(zaxisID, position) > cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, position)
gridInqPosition(zaxisID) -> cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, &position)
gridDefUUID(zaxisID, uuidOfHGrid) -> cdiDefKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfHGrid, length)
gridInqUUID(zaxisID) -> cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, uuidOfHGrid, &length)
......
......@@ -18,10 +18,10 @@ int main(void)
// Create a grid reference
gridID = gridCreate(GRID_UNSTRUCTURED, nlon*nlat);
gridDefNumber(gridID, 123);
gridDefPosition(gridID, 3);
gridDefReference(gridID, "http://www.x.y/gridfile.nc");
gridDefUUID(gridID, "1234569887654321");
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 123);
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, 3);
cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, "http://www.x.y/gridfile.nc");
cdiDefKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, "1234569887654321", CDI_UUID_SIZE);
// Create a surface level Z-axis
zaxisID1 = zaxisCreate(ZAXIS_SURFACE, 1);
......
......@@ -18,10 +18,10 @@ int main(void)
// Create a grid reference
gridID = gridCreate(GRID_UNSTRUCTURED, nlon*nlat);
gridDefNumber(gridID, 123);
gridDefPosition(gridID, 3);
gridDefReference(gridID, "http://www.x.y/gridfile.nc");
gridDefUUID(gridID, "1234569887654321");
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 123);
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, 3);
cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, "http://www.x.y/gridfile.nc");
cdiDefKeyBytes(gridID, CDI_GLOBAL, CDI_KEY_UUID, "1234569887654321", CDI_UUID_SIZE);
// Create a surface level Z-axis
zaxisID1 = zaxisCreate(ZAXIS_SURFACE, 1);
......
......@@ -61,9 +61,11 @@ static int defineGrid()
gridDefDatatype ( gridID, DOUBLE_PRECISION );
gridDefTrunc ( gridID, 1 );
gridDefNumber ( gridID, 6 );
gridDefPosition ( gridID, 7 );
gridDefReference ( gridID, "myReference" );
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 6);
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, 7);
cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, "myReference");
/* gridDefLCC ( gridID, double originLon, double originLat, */
/* double lonParY, double lat1, double lat2, double xinc, double yinc, int projflag, int scanflag); */
/* gridDefLcc2 ( gridID, double earth_radius, double lon_0, */
......@@ -103,9 +105,7 @@ static int defineZaxis ()
static int defineTaxis ()
{
int taxisID = CDI_UNDEFID;
taxisID = taxisCreate(TAXIS_ABSOLUTE);
int taxisID = taxisCreate(TAXIS_ABSOLUTE);
taxisDefType ( taxisID, 0 );
taxisDefVdate ( taxisID, 1 );
......@@ -200,8 +200,7 @@ static void modelRun ( MPI_Comm comm )
reshPackBufferCreate(&sendBuffer, &bufferSize, &comm);
xmpi ( MPI_Send ( sendBuffer, bufferSize, MPI_PACKED, 0, 0, comm ));
recvBuffer = Malloc((size_t)bufferSize);
xmpi ( MPI_Recv ( recvBuffer, bufferSize, MPI_PACKED, 0,
0, comm, &status ));
xmpi ( MPI_Recv ( recvBuffer, bufferSize, MPI_PACKED, 0, 0, comm, &status ));
namespaceSetActive ( 1 );
reshUnpackResources(recvBuffer, bufferSize, &comm);
......
......@@ -65,9 +65,11 @@ static int defineGrid (void)
gridDefDatatype ( gridID, DOUBLE_PRECISION );
gridDefTrunc ( gridID, 1 );
gridDefParamGME ( gridID, 2, 3, 4, 5 );
gridDefNumber ( gridID, 6 );
gridDefPosition ( gridID, 7 );
gridDefReference ( gridID, "myReference" );
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDUSED, 6);
cdiDefKeyInt(gridID, CDI_GLOBAL, CDI_KEY_NUMBEROFGRIDINREFERENCE, 7);
cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, "myReference");
for ( i = 0; i < nlon*nlat; i++ )
area_vec[i] = 0.1 * i;
gridDefArea ( gridID, ap );
......
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