Commit 45fb2df8 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gribHandleNew: set numberOfValues=0.

parent 34895fc3
...@@ -58,15 +58,6 @@ void gribContainersNew(stream_t * streamptr); ...@@ -58,15 +58,6 @@ void gribContainersNew(stream_t * streamptr);
void gribContainersDelete(stream_t * streamptr); void gribContainersDelete(stream_t * streamptr);
#ifdef HAVE_LIBGRIB_API #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) static inline int my_grib_set_double(grib_handle* h, const char* key, double val)
{ {
if ( cdiGribApiDebug ) if ( cdiGribApiDebug )
...@@ -100,6 +91,16 @@ static inline int my_grib_set_string(grib_handle* h, const char* key, const char ...@@ -100,6 +91,16 @@ static inline int my_grib_set_string(grib_handle* h, const char* key, const char
return ret_val; 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) static inline void gribHandleDelete(void *gh)
{ {
grib_handle_delete((struct grib_handle *)gh); grib_handle_delete((struct grib_handle *)gh);
......
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