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

Replaced zaxisInqName()/zaxisDefName() by cdiInqKeyString()/cdiDefKeyString().

parent d7afd474
......@@ -22,18 +22,12 @@ gridInqUUID(zaxisID) -> cdiInqKeyBytes(gridID, CDI_GLOBAL, CDI_
gridDefReference(zaxisID, reference) -> cdiDefKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference)
gridInqReference(zaxisID) -> cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference, &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)
zaxisDefYname(zaxisID, yname) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, yname)
zaxisDefYlongname(zaxisID, ylongname) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, ylongname)
zaxisDefYunits(zaxisID, yunits) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, yunits)
zaxisInqXname(zaxisID, xname) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, xname, &length)
zaxisInqXlongname(zaxisID, xlongname) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, xlongname, &length)
zaxisInqXunits(zaxisID, xunits) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, xunits, &length)
zaxisInqYname(zaxisID, yname) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, yname, &length)
zaxisInqYlongname(zaxisID, ylongname) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, ylongname, &length)
zaxisInqYunits(zaxisID, yunits) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, yunits, &length)
zaxisDefName(zaxisID, name) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name)
zaxisDefLongname(zaxisID, longname) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, longname)
zaxisDefUnits(zaxisID, units) -> cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units)
zaxisInqName(zaxisID, name) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name, &length)
zaxisInqLongname(zaxisID, longname) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, longname, &length)
zaxisInqUnits(zaxisID, units) -> cdiInqKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, units, &length)
zaxisDefNumber(zaxisID, number) -> cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, number)
zaxisInqNumber(zaxisID) -> cdiInqKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_NUMBEROFVGRIDUSED, &number)
......
......@@ -90,9 +90,11 @@ static int defineZaxis ()
zaxisID = zaxisCreate(ZAXIS_PRESSURE, nlev);
zaxisDefLevels(zaxisID, levs);
zaxisDefLevel ( zaxisID, 2, 8507.3 );
zaxisDefName ( zaxisID, "myName" );
zaxisDefLongname ( zaxisID, "myLongname" );
zaxisDefUnits ( zaxisID, "myUnits" );
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, "myName");
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, "myLongname");
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, "myUnits");
zaxisDefDatatype ( zaxisID, DOUBLE_PRECISION );
cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, 1);
zaxisDefVct ( zaxisID, 3, vct );
......
......@@ -971,7 +971,7 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, const double *levels, c
if ( (zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF) && vctsize > 0 )
zaxisDefVct(zaxisID, vctsize, vct);
if ( name && name[0] ) zaxisDefName(zaxisID, name);
if ( name && name[0] ) cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, name);
if ( longname && longname[0] ) zaxisDefLongname(zaxisID, longname);
if ( units && units[0] ) zaxisDefUnits(zaxisID, units);
zaxisDefDatatype(zaxisID, prec);
......
......@@ -691,7 +691,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
}
zaxisInqName(zaxisID, ctemp);
zaxisDefName(zaxisID2, ctemp);
cdiDefKeyString(zaxisID2, CDI_GLOBAL, CDI_KEY_NAME, ctemp);
zaxisInqLongname(zaxisID, ctemp);
zaxisDefLongname(zaxisID2, ctemp);
zaxisInqUnits(zaxisID, ctemp);
......
......@@ -192,7 +192,7 @@ int zaxisCreate_(int zaxistype, int size, int id)
Error("Internal problem! zaxistype > CDI_MaxZaxistype");
const int zaxisID = zaxisptr->self;
zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, ZaxistypeEntry[zaxistype].name);
if ( zaxistype != ZAXIS_GENERIC ) zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname);
zaxisDefUnits(zaxisID, ZaxistypeEntry[zaxistype].units);
......
......@@ -93,9 +93,11 @@ static int defineZaxis (void)
int zaxisID = zaxisCreate(ZAXIS_PRESSURE, nlev);
zaxisDefLevels(zaxisID, levs);
zaxisDefLevel ( zaxisID, 2, 8507.3 );
zaxisDefName ( zaxisID, "myName" );
zaxisDefLongname ( zaxisID, "myLongname" );
zaxisDefUnits ( zaxisID, "myUnits" );
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_NAME, "myName");
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_LONGNAME, "myLongname");
cdiDefKeyString(zaxisID, CDI_GLOBAL, CDI_KEY_UNITS, "myUnits");
zaxisDefDatatype ( zaxisID, DOUBLE_PRECISION );
cdiDefKeyInt(zaxisID, CDI_GLOBAL, CDI_KEY_TYPEOFFIRSTFIXEDSURFACE, 1);
zaxisDefVct ( zaxisID, 3, vct );
......
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