Commit 131272f7 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added CDI_KEY_CONSTITUENTTYPE.

parent 08a080f2
......@@ -803,6 +803,7 @@ size_t gridInqYCvals(int gridID, char *ycvals[]);
#define CDI_KEY_SECTION2PADDINGLENGTH 819 // GRIB2 length of section2Padding
#define CDI_KEY_SECTION2PADDING 820 // GRIB2 section2Padding
#define CDI_KEY_UVRELATIVETOGRID 821 // GRIB uvRelativeToGrid
#define CDI_KEY_CONSTITUENTTYPE 822 // GRIB2 constituentType
// cdiDefKeyInt: Define an integer value from a key of a CDI variable
int cdiDefKeyInt(int cdiID, int varID, int key, int value);
......
......@@ -464,6 +464,11 @@ void gribapiGetKeys(grib_handle *gh, int varID)
long backgroundProcess = 0;
if ( grib_get_long(gh, "backgroundProcess", &backgroundProcess) == 0 )
varDefKeyInt(varID, CDI_KEY_BACKGROUNDPROCESS, (int) backgroundProcess);
/*
long constituentType = 0;
if ( grib_get_long(gh, "constituentType", &constituentType) == 0 )
varDefKeyInt(varID, CDI_KEY_CONSTITUENTTYPE, (int) constituentType);
*/
/*
Get the ensemble Info from the grib-2 Tables and update the intermediate datastructure.
......@@ -3023,6 +3028,11 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
int typeOfProcessedData = 0;
status = cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFPROCESSEDDATA, &typeOfProcessedData);
if ( status == 0 ) GRIB_CHECK(my_grib_set_long(gh, "typeOfProcessedData", (long)typeOfProcessedData), 0);
/*
int constituentType = 0;
status = cdiInqKeyInt(vlistID, varID, CDI_KEY_CONSTITUENTTYPE, &constituentType);
if ( status == 0 ) GRIB_CHECK(my_grib_set_long(gh, "constituentType", (long)constituentType), 0);
*/
}
}
......
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