Commit 270f330a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Narrow scope of backgroundProcess.

parent cd55e4f8
......@@ -3034,8 +3034,6 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
int datatype = vlistInqVarDatatype(vlistID, varID);
int typeOfGeneratingProcess = 0;
cdiInqKeyInt(vlistID, varID, CDI_KEY_TYPEOFGENERATINGPROCESS, &typeOfGeneratingProcess);
int backgroundProcess = 0;
cdiInqKeyInt(vlistID, varID, CDI_KEY_BACKGROUNDPROCESS, &backgroundProcess);
int productDefinitionTemplate = 0;
cdiInqKeyInt(vlistID, varID, CDI_KEY_PRODUCTDEFINITIONTEMPLATE, &productDefinitionTemplate);
......@@ -3058,6 +3056,8 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
{
if ( ! gc->init )
{
int backgroundProcess = 0;
cdiInqKeyInt(vlistID, varID, CDI_KEY_BACKGROUNDPROCESS, &backgroundProcess);
GRIB_CHECK(my_grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0);
GRIB_CHECK(my_grib_set_long(gh, "backgroundProcess", backgroundProcess), 0);
int status, tablesVersion, localTablesVersion;
......
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