mirror of https://github.com/ecmwf/eccodes.git
Cleanup
This commit is contained in:
parent
f979f17ef3
commit
5c61344551
|
@ -63,7 +63,7 @@ int main(int argc, char* argv[])
|
||||||
snprintf(key, sizeof(key), "/subsetNumber=%d/blockNumber", i);
|
snprintf(key, sizeof(key), "/subsetNumber=%d/blockNumber", i);
|
||||||
|
|
||||||
CODES_CHECK(codes_get_native_type(h, key, &ktype), 0);
|
CODES_CHECK(codes_get_native_type(h, key, &ktype), 0);
|
||||||
//printf("Type = %d\n", ktype);
|
/* printf("Type = %d\n", ktype); */
|
||||||
|
|
||||||
printf(" subsetNumber=%d", i);
|
printf(" subsetNumber=%d", i);
|
||||||
/* read and print some data values */
|
/* read and print some data values */
|
||||||
|
|
|
@ -26,6 +26,9 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* h = codes_grib_handle_new_from_samples(NULL, "GRIB2"); */
|
/* h = codes_grib_handle_new_from_samples(NULL, "GRIB2"); */
|
||||||
|
h = codes_handle_new_from_samples(NULL, "just a test");
|
||||||
|
if (h) return 1;
|
||||||
|
|
||||||
h = codes_handle_new_from_samples(NULL, "GRIB2");
|
h = codes_handle_new_from_samples(NULL, "GRIB2");
|
||||||
if (!h) {
|
if (!h) {
|
||||||
fprintf(stderr, "Cannot create grib handle\n");
|
fprintf(stderr, "Cannot create grib handle\n");
|
||||||
|
|
|
@ -229,12 +229,13 @@ grib_handle* codes_handle_new_from_samples(grib_context* c, const char* name)
|
||||||
}
|
}
|
||||||
|
|
||||||
g = codes_external_template(c, PRODUCT_ANY, name);
|
g = codes_external_template(c, PRODUCT_ANY, name);
|
||||||
if (!g)
|
if (!g) {
|
||||||
grib_context_log(c, GRIB_LOG_ERROR,
|
grib_context_log(c, GRIB_LOG_ERROR,
|
||||||
"Unable to load sample file '%s.tmpl'\n"
|
"Unable to load sample file '%s.tmpl'\n"
|
||||||
" from %s\n"
|
" from %s\n"
|
||||||
" (ecCodes Version=%s)",
|
" (ecCodes Version=%s)",
|
||||||
name, c->grib_samples_path, ECCODES_VERSION_STR);
|
name, c->grib_samples_path, ECCODES_VERSION_STR);
|
||||||
|
}
|
||||||
|
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
@ -514,7 +515,7 @@ grib_handle* grib_handle_new_from_partial_message_copy(grib_context* c, const vo
|
||||||
|
|
||||||
memcpy(copy, data, size);
|
memcpy(copy, data, size);
|
||||||
|
|
||||||
g = grib_handle_new_from_partial_message(c, copy, size);
|
g = grib_handle_new_from_partial_message(c, copy, size);
|
||||||
g->buffer->property = CODES_MY_BUFFER;
|
g->buffer->property = CODES_MY_BUFFER;
|
||||||
|
|
||||||
return g;
|
return g;
|
||||||
|
|
Loading…
Reference in New Issue