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

Replaced gridDefXname()/gridDefYname() by cdiDefKeyString() with CDI_KEY_NAME.

parent da5acbec
......@@ -31,8 +31,9 @@ int main(void)
gridDefYsize(gridID, nlat);
gridDefXvals(gridID, lons2D);
gridDefYvals(gridID, lats2D);
gridDefXname(gridID, "lon");
gridDefYname(gridID, "lat");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "lon");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "lat");
}
// Create a rotated lon/lat grid
......@@ -45,8 +46,10 @@ int main(void)
gridDefYsize(projID, nlat);
gridDefXvals(projID, rlons);
gridDefYvals(projID, rlats);
gridDefXname(projID, "rlon");
gridDefYname(projID, "rlat");
cdiDefKeyString(projID, CDI_XAXIS, CDI_KEY_NAME, "rlon");
cdiDefKeyString(projID, CDI_YAXIS, CDI_KEY_NAME, "rlat");
gridDefParamRLL(projID, -162., 39.25, 0);
gridDefProj(gridID, projID);
......
......@@ -22,8 +22,9 @@ int main(void)
gridDefYsize(gridID, nlat);
gridDefXvals(gridID, lons);
gridDefYvals(gridID, lats);
gridDefXname(gridID, "rlon");
gridDefYname(gridID, "rlat");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "rlon");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "rlat");
// Create a surface level Z-axis
int zaxisID1 = zaxisCreate(ZAXIS_SURFACE, 1);
......
......@@ -51,12 +51,14 @@ static int defineGrid()
for ( i = 0; i < nlon*nlat; i++ )
mask_vec[i] = 1;
gridDefMask ( gridID, mp );
gridDefXname ( gridID, "myXname" );
gridDefXlongname ( gridID, "myXlongname" );
gridDefXunits ( gridID, "myXunits" );
gridDefYname ( gridID, "myYname" );
gridDefYlongname ( gridID, "myYlongname" );
gridDefYunits ( gridID, "myYunits" );
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "myXname");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "myYname");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, "myXlongname");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, "myYlongname");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits");
gridDefDatatype ( gridID, DOUBLE_PRECISION );
gridDefTrunc ( gridID, 1 );
gridDefNumber ( gridID, 6 );
......
......@@ -54,12 +54,14 @@ static int defineGrid (void)
for ( i = 0; i < nlon*nlat; i++ )
mask_vec[i] = 1;
gridDefMask ( gridID, mp );
gridDefXname ( gridID, "myXname" );
gridDefXlongname ( gridID, "myXlongname" );
gridDefXunits ( gridID, "myXunits" );
gridDefYname ( gridID, "myYname" );
gridDefYlongname ( gridID, "myYlongname" );
gridDefYunits ( gridID, "myYunits" );
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "myXname");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "myYname");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, "myXlongname");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, "myYlongname");
cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, "myXunits");
cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, "myYunits");
gridDefDatatype ( gridID, DOUBLE_PRECISION );
gridDefTrunc ( gridID, 1 );
gridDefParamGME ( gridID, 2, 3, 4, 5 );
......
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