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