Skip to content
Snippets Groups Projects
Commit 45fb2df8 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gribHandleNew: set numberOfValues=0.

parent 34895fc3
No related branches found
No related tags found
No related merge requests found
......@@ -58,15 +58,6 @@ void gribContainersNew(stream_t * streamptr);
void gribContainersDelete(stream_t * streamptr);
#ifdef HAVE_LIBGRIB_API
static inline void *gribHandleNew(int editionNumber)
{
void *gh = (void *)grib_handle_new_from_samples(NULL, (editionNumber == 1) ? "GRIB1" : "GRIB2");
if ( gh == NULL ) Error("grib_handle_new_from_samples failed!");
return gh;
}
static inline int my_grib_set_double(grib_handle* h, const char* key, double val)
{
if ( cdiGribApiDebug )
......@@ -100,6 +91,16 @@ static inline int my_grib_set_string(grib_handle* h, const char* key, const char
return ret_val;
}
static inline void *gribHandleNew(int editionNumber)
{
void *gh = (void *)grib_handle_new_from_samples(NULL, (editionNumber == 1) ? "GRIB1" : "GRIB2");
if ( gh == NULL ) Error("grib_handle_new_from_samples failed!");
GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", 0L), 0);
return gh;
}
static inline void gribHandleDelete(void *gh)
{
grib_handle_delete((struct grib_handle *)gh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment