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

Change interface of gribapiChangeParameterIdentification().

parent 69ddc399
......@@ -129,7 +129,7 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1)
cgribexChangeParameterIdentification(gh, GribChangeParID_code, GribChangeParID_ltype, GribChangeParID_lev);
cgribex_handle_delete(gh);
#elif defined HAVE_LIBGRIB_API
grib_handle *gh = grib_handle_new_from_message(NULL, (void*) gribbuffer, recsize);
void *gh = (void*)grib_handle_new_from_message(NULL, (void*) gribbuffer, recsize);
gribapiChangeParameterIdentification(gh, GribChangeParID_code, GribChangeParID_ltype, GribChangeParID_lev);
grib_handle_delete(gh);
#endif
......
......@@ -2693,16 +2693,16 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
}
void gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int lev)
void gribapiChangeParameterIdentification(void *gh, int code, int ltype, int lev)
{
long indicatorOfParameter, indicatorOfTypeOfLevel, level; // timeRangeIndicator: could be included later
indicatorOfParameter = code;
indicatorOfTypeOfLevel = ltype;
level = lev;
if (indicatorOfParameter!=-1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", indicatorOfParameter), 0);
if (indicatorOfTypeOfLevel!=-1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfTypeOfLevel", indicatorOfTypeOfLevel), 0);
if (level!=-1) GRIB_CHECK(my_grib_set_long(gh, "level", level), 0);
if (indicatorOfParameter!=-1) GRIB_CHECK(my_grib_set_long((grib_handle*)gh, "indicatorOfParameter", indicatorOfParameter), 0);
if (indicatorOfTypeOfLevel!=-1) GRIB_CHECK(my_grib_set_long((grib_handle*)gh, "indicatorOfTypeOfLevel", indicatorOfTypeOfLevel), 0);
if (level!=-1) GRIB_CHECK(my_grib_set_long((grib_handle*)gh, "level", level), 0);
}
#endif
......
......@@ -15,7 +15,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
long datasize, const double *data, int nmiss, void **gribbuffer, size_t *gribbuffersize,
int ljpeg, void *gribContainer);
void gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int lev);
void gribapiChangeParameterIdentification(void *gh, int code, int ltype, int lev);
#endif /* _STREAM_GRIBAPI_H */
/*
......
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